commit 1c2342574c5214348fc01d8e47758efc78845ab2 Author: gxt_kt Date: Mon Dec 9 19:29:55 2024 +0800 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..51efef2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +*build* +bin/ +cmake-build* +.cache +.idea +.vscode +.cache +*__pycache__* diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..a840e1c --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,56 @@ +cmake_minimum_required(VERSION 3.0) + +project(grpc) + +set(CMAKE_CXX_STANDARD 20) + +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +option(CMAKE_BUILD_TYPE Release) # Debug Release RelWithDebInfo + +# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-elide-constructors") +# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-elide-constructors") +# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") + +if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + message("Building for Linux platform") +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + message("Building for macOS platform") + set(CMAKE_C_COMPILER "/opt/homebrew/bin/aarch64-apple-darwin23-gcc-14") # gcc clang` 指定c编译器 + set(CMAKE_CXX_COMPILER "/opt/homebrew/bin/aarch64-apple-darwin23-g++-14") # g++ clang++` 指定c++编译器 +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + message("Building for Windows platform") +else() + message(FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_NAME}") +endif() + + +find_package(debugstream) +include_directories(include) + +find_package(Protobuf REQUIRED CONFIG) +find_package(gRPC CONFIG REQUIRED) + + +include_directories(protoc) + +set(LIB + gRPC::grpc++ + gRPC::grpc++_reflection + protobuf::libprotobuf +) + +# add_executable(grpc src/main.cc) +# target_link_libraries(libhv ${LIB}) + +file(GLOB_RECURSE PROTOC_SRCS "protoc/*.cc") + + +add_executable(grpc_server src/grpc_server_main.cc +${PROTOC_SRCS} +) +add_executable(grpc_client src/grpc_client_main.cc +${PROTOC_SRCS} +) +target_link_libraries(grpc_server ${LIB} debugstream) +target_link_libraries(grpc_client ${LIB} debugstream) diff --git a/include/common.h b/include/common.h new file mode 100644 index 0000000..c734921 --- /dev/null +++ b/include/common.h @@ -0,0 +1,2 @@ +#pragma once +#include diff --git a/include/protoc.h b/include/protoc.h new file mode 100644 index 0000000..eb8e313 --- /dev/null +++ b/include/protoc.h @@ -0,0 +1,26 @@ +#pragma once + +#include +#include +#include +#include +#include + +#include "market_data.grpc.pb.h" + +using grpc::Server; +using grpc::ServerBuilder; +using grpc::ServerContext; +using grpc::ServerReader; +using grpc::ServerReaderWriter; +using grpc::ServerWriter; +using grpc::Status; + +inline long GetTimeUs() { + // 获取当前时间点 + auto now = std::chrono::high_resolution_clock::now(); + // 将时间点转换为微秒 + auto duration = std::chrono::duration_cast( + now.time_since_epoch()); + return duration.count(); +} diff --git a/market_data.proto b/market_data.proto new file mode 100644 index 0000000..aeb265f --- /dev/null +++ b/market_data.proto @@ -0,0 +1,123 @@ +syntax = "proto3"; + +option java_multiple_files = true; +option java_package = "io.grpc.example.market_data"; + +option java_outer_classname = "market_data"; +option objc_class_prefix = "HLW"; + +package market_data; + +service TestService { + rpc GetData1(CThostFtdcDepthMarketDataField) returns(MsgReply) {} + rpc GetData2(ResMsg) returns(MsgReply) {} +} + +message CThostFtdcDepthMarketDataField { + // 交易日 + string TradingDay = 1; + // 保留的无效字段 + string reserve1 = 2; + // 交易所代码 + string ExchangeID = 3; + // 保留的无效字段 + string reserve2 = 4; + // 最新价 + double LastPrice = 5; + // 上次结算价 + double PreSettlementPrice = 6; + // 昨收盘 + double PreClosePrice = 7; + // 昨持仓量 + double PreOpenInterest = 8; + // 今开盘 + double OpenPrice = 9; + // 最高价 + double HighestPrice = 10; + // 最低价 + double LowestPrice = 11; + // 数量 + int32 Volume = 12; + // 成交金额 + double Turnover = 13; + // 持仓量 + double OpenInterest = 14; + // 今收盘 + double ClosePrice = 15; + // 本次结算价 + double SettlementPrice = 16; + // 涨停板价 + double UpperLimitPrice = 17; + // 跌停板价 + double LowerLimitPrice = 18; + // 昨虚实度 + double PreDelta = 19; + // 今虚实度 + double CurrDelta = 20; + // 最后修改时间 + string UpdateTime = 21; + // 最后修改毫秒 + int32 UpdateMillisec = 22; + // 申买价一 + double BidPrice1 = 23; + // 申买量一 + int32 BidVolume1 = 24; + // 申卖价一 + double AskPrice1 = 25; + // 申卖量一 + int32 AskVolume1 = 26; + // 申买价二 + double BidPrice2 = 27; + // 申买量二 + int32 BidVolume2 = 28; + // 申卖价二 + double AskPrice2 = 29; + // 申卖量二 + int32 AskVolume2 = 30; + // 申买价三 + double BidPrice3 = 31; + // 申买量三 + int32 BidVolume3 = 32; + // 申卖价三 + double AskPrice3 = 33; + // 申卖量三 + int32 AskVolume3 = 34; + // 申买价四 + double BidPrice4 = 35; + // 申买量四 + int32 BidVolume4 = 36; + // 申卖价四 + double AskPrice4 = 37; + // 申卖量四 + int32 AskVolume4 = 38; + // 申买价五 + double BidPrice5 = 39; + // 申买量五 + int32 BidVolume5 = 40; + // 申卖价五 + double AskPrice5 = 41; + // 申卖量五 + int32 AskVolume5 = 42; + // 当日均价 + double AveragePrice = 43; + // 业务日期 + string ActionDay = 44; + // 合约代码 + string InstrumentID = 45; + // 合约在交易所的代码 + string ExchangeInstID = 46; +} + +message ResMsg { + string signame = 1; + string InstrumentID = 2; + int32 sigflag = 3; + double sigvalue = 4; + string offset = 5; // char 替换为 string + string dir = 6; // char 替换为 string + int32 vol = 7; + repeated double other_params = 8; + repeated string other_msg = 9; +} + +message MsgReply { string message = 1; } diff --git a/protoc/market_data.grpc.pb.cc b/protoc/market_data.grpc.pb.cc new file mode 100644 index 0000000..e3df8ea --- /dev/null +++ b/protoc/market_data.grpc.pb.cc @@ -0,0 +1,128 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: market_data.proto + +#include "market_data.pb.h" +#include "market_data.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace market_data { + +static const char* TestService_method_names[] = { + "/market_data.TestService/GetData1", + "/market_data.TestService/GetData2", +}; + +std::unique_ptr< TestService::Stub> TestService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< TestService::Stub> stub(new TestService::Stub(channel, options)); + return stub; +} + +TestService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_GetData1_(TestService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_GetData2_(TestService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status TestService::Stub::GetData1(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField& request, ::market_data::MsgReply* response) { + return ::grpc::internal::BlockingUnaryCall< ::market_data::CThostFtdcDepthMarketDataField, ::market_data::MsgReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetData1_, context, request, response); +} + +void TestService::Stub::async::GetData1(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField* request, ::market_data::MsgReply* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::market_data::CThostFtdcDepthMarketDataField, ::market_data::MsgReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetData1_, context, request, response, std::move(f)); +} + +void TestService::Stub::async::GetData1(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField* request, ::market_data::MsgReply* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetData1_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>* TestService::Stub::PrepareAsyncGetData1Raw(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::market_data::MsgReply, ::market_data::CThostFtdcDepthMarketDataField, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetData1_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>* TestService::Stub::AsyncGetData1Raw(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncGetData1Raw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status TestService::Stub::GetData2(::grpc::ClientContext* context, const ::market_data::ResMsg& request, ::market_data::MsgReply* response) { + return ::grpc::internal::BlockingUnaryCall< ::market_data::ResMsg, ::market_data::MsgReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetData2_, context, request, response); +} + +void TestService::Stub::async::GetData2(::grpc::ClientContext* context, const ::market_data::ResMsg* request, ::market_data::MsgReply* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::market_data::ResMsg, ::market_data::MsgReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetData2_, context, request, response, std::move(f)); +} + +void TestService::Stub::async::GetData2(::grpc::ClientContext* context, const ::market_data::ResMsg* request, ::market_data::MsgReply* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetData2_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>* TestService::Stub::PrepareAsyncGetData2Raw(::grpc::ClientContext* context, const ::market_data::ResMsg& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::market_data::MsgReply, ::market_data::ResMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetData2_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>* TestService::Stub::AsyncGetData2Raw(::grpc::ClientContext* context, const ::market_data::ResMsg& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncGetData2Raw(context, request, cq); + result->StartCall(); + return result; +} + +TestService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + TestService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< TestService::Service, ::market_data::CThostFtdcDepthMarketDataField, ::market_data::MsgReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](TestService::Service* service, + ::grpc::ServerContext* ctx, + const ::market_data::CThostFtdcDepthMarketDataField* req, + ::market_data::MsgReply* resp) { + return service->GetData1(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + TestService_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< TestService::Service, ::market_data::ResMsg, ::market_data::MsgReply, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](TestService::Service* service, + ::grpc::ServerContext* ctx, + const ::market_data::ResMsg* req, + ::market_data::MsgReply* resp) { + return service->GetData2(ctx, req, resp); + }, this))); +} + +TestService::Service::~Service() { +} + +::grpc::Status TestService::Service::GetData1(::grpc::ServerContext* context, const ::market_data::CThostFtdcDepthMarketDataField* request, ::market_data::MsgReply* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status TestService::Service::GetData2(::grpc::ServerContext* context, const ::market_data::ResMsg* request, ::market_data::MsgReply* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace market_data + diff --git a/protoc/market_data.grpc.pb.h b/protoc/market_data.grpc.pb.h new file mode 100644 index 0000000..7da76ce --- /dev/null +++ b/protoc/market_data.grpc.pb.h @@ -0,0 +1,397 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: market_data.proto +#ifndef GRPC_market_5fdata_2eproto__INCLUDED +#define GRPC_market_5fdata_2eproto__INCLUDED + +#include "market_data.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace market_data { + +class TestService final { + public: + static constexpr char const* service_full_name() { + return "market_data.TestService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status GetData1(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField& request, ::market_data::MsgReply* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::market_data::MsgReply>> AsyncGetData1(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::market_data::MsgReply>>(AsyncGetData1Raw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::market_data::MsgReply>> PrepareAsyncGetData1(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::market_data::MsgReply>>(PrepareAsyncGetData1Raw(context, request, cq)); + } + virtual ::grpc::Status GetData2(::grpc::ClientContext* context, const ::market_data::ResMsg& request, ::market_data::MsgReply* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::market_data::MsgReply>> AsyncGetData2(::grpc::ClientContext* context, const ::market_data::ResMsg& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::market_data::MsgReply>>(AsyncGetData2Raw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::market_data::MsgReply>> PrepareAsyncGetData2(::grpc::ClientContext* context, const ::market_data::ResMsg& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::market_data::MsgReply>>(PrepareAsyncGetData2Raw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + virtual void GetData1(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField* request, ::market_data::MsgReply* response, std::function) = 0; + virtual void GetData1(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField* request, ::market_data::MsgReply* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void GetData2(::grpc::ClientContext* context, const ::market_data::ResMsg* request, ::market_data::MsgReply* response, std::function) = 0; + virtual void GetData2(::grpc::ClientContext* context, const ::market_data::ResMsg* request, ::market_data::MsgReply* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::market_data::MsgReply>* AsyncGetData1Raw(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::market_data::MsgReply>* PrepareAsyncGetData1Raw(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::market_data::MsgReply>* AsyncGetData2Raw(::grpc::ClientContext* context, const ::market_data::ResMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::market_data::MsgReply>* PrepareAsyncGetData2Raw(::grpc::ClientContext* context, const ::market_data::ResMsg& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status GetData1(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField& request, ::market_data::MsgReply* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>> AsyncGetData1(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>>(AsyncGetData1Raw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>> PrepareAsyncGetData1(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>>(PrepareAsyncGetData1Raw(context, request, cq)); + } + ::grpc::Status GetData2(::grpc::ClientContext* context, const ::market_data::ResMsg& request, ::market_data::MsgReply* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>> AsyncGetData2(::grpc::ClientContext* context, const ::market_data::ResMsg& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>>(AsyncGetData2Raw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>> PrepareAsyncGetData2(::grpc::ClientContext* context, const ::market_data::ResMsg& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>>(PrepareAsyncGetData2Raw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void GetData1(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField* request, ::market_data::MsgReply* response, std::function) override; + void GetData1(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField* request, ::market_data::MsgReply* response, ::grpc::ClientUnaryReactor* reactor) override; + void GetData2(::grpc::ClientContext* context, const ::market_data::ResMsg* request, ::market_data::MsgReply* response, std::function) override; + void GetData2(::grpc::ClientContext* context, const ::market_data::ResMsg* request, ::market_data::MsgReply* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>* AsyncGetData1Raw(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>* PrepareAsyncGetData1Raw(::grpc::ClientContext* context, const ::market_data::CThostFtdcDepthMarketDataField& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>* AsyncGetData2Raw(::grpc::ClientContext* context, const ::market_data::ResMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::market_data::MsgReply>* PrepareAsyncGetData2Raw(::grpc::ClientContext* context, const ::market_data::ResMsg& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_GetData1_; + const ::grpc::internal::RpcMethod rpcmethod_GetData2_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + virtual ::grpc::Status GetData1(::grpc::ServerContext* context, const ::market_data::CThostFtdcDepthMarketDataField* request, ::market_data::MsgReply* response); + virtual ::grpc::Status GetData2(::grpc::ServerContext* context, const ::market_data::ResMsg* request, ::market_data::MsgReply* response); + }; + template + class WithAsyncMethod_GetData1 : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_GetData1() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_GetData1() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetData1(::grpc::ServerContext* /*context*/, const ::market_data::CThostFtdcDepthMarketDataField* /*request*/, ::market_data::MsgReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetData1(::grpc::ServerContext* context, ::market_data::CThostFtdcDepthMarketDataField* request, ::grpc::ServerAsyncResponseWriter< ::market_data::MsgReply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_GetData2 : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_GetData2() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_GetData2() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetData2(::grpc::ServerContext* /*context*/, const ::market_data::ResMsg* /*request*/, ::market_data::MsgReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetData2(::grpc::ServerContext* context, ::market_data::ResMsg* request, ::grpc::ServerAsyncResponseWriter< ::market_data::MsgReply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_GetData1 > AsyncService; + template + class WithCallbackMethod_GetData1 : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_GetData1() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::market_data::CThostFtdcDepthMarketDataField, ::market_data::MsgReply>( + [this]( + ::grpc::CallbackServerContext* context, const ::market_data::CThostFtdcDepthMarketDataField* request, ::market_data::MsgReply* response) { return this->GetData1(context, request, response); }));} + void SetMessageAllocatorFor_GetData1( + ::grpc::MessageAllocator< ::market_data::CThostFtdcDepthMarketDataField, ::market_data::MsgReply>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::market_data::CThostFtdcDepthMarketDataField, ::market_data::MsgReply>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_GetData1() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetData1(::grpc::ServerContext* /*context*/, const ::market_data::CThostFtdcDepthMarketDataField* /*request*/, ::market_data::MsgReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetData1( + ::grpc::CallbackServerContext* /*context*/, const ::market_data::CThostFtdcDepthMarketDataField* /*request*/, ::market_data::MsgReply* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_GetData2 : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_GetData2() { + ::grpc::Service::MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::market_data::ResMsg, ::market_data::MsgReply>( + [this]( + ::grpc::CallbackServerContext* context, const ::market_data::ResMsg* request, ::market_data::MsgReply* response) { return this->GetData2(context, request, response); }));} + void SetMessageAllocatorFor_GetData2( + ::grpc::MessageAllocator< ::market_data::ResMsg, ::market_data::MsgReply>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + static_cast<::grpc::internal::CallbackUnaryHandler< ::market_data::ResMsg, ::market_data::MsgReply>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_GetData2() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetData2(::grpc::ServerContext* /*context*/, const ::market_data::ResMsg* /*request*/, ::market_data::MsgReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetData2( + ::grpc::CallbackServerContext* /*context*/, const ::market_data::ResMsg* /*request*/, ::market_data::MsgReply* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_GetData1 > CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_GetData1 : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_GetData1() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_GetData1() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetData1(::grpc::ServerContext* /*context*/, const ::market_data::CThostFtdcDepthMarketDataField* /*request*/, ::market_data::MsgReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_GetData2 : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_GetData2() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_GetData2() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetData2(::grpc::ServerContext* /*context*/, const ::market_data::ResMsg* /*request*/, ::market_data::MsgReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_GetData1 : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_GetData1() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_GetData1() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetData1(::grpc::ServerContext* /*context*/, const ::market_data::CThostFtdcDepthMarketDataField* /*request*/, ::market_data::MsgReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetData1(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_GetData2 : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_GetData2() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_GetData2() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetData2(::grpc::ServerContext* /*context*/, const ::market_data::ResMsg* /*request*/, ::market_data::MsgReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetData2(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawCallbackMethod_GetData1 : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_GetData1() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->GetData1(context, request, response); })); + } + ~WithRawCallbackMethod_GetData1() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetData1(::grpc::ServerContext* /*context*/, const ::market_data::CThostFtdcDepthMarketDataField* /*request*/, ::market_data::MsgReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetData1( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_GetData2 : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_GetData2() { + ::grpc::Service::MarkMethodRawCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->GetData2(context, request, response); })); + } + ~WithRawCallbackMethod_GetData2() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetData2(::grpc::ServerContext* /*context*/, const ::market_data::ResMsg* /*request*/, ::market_data::MsgReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetData2( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_GetData1 : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_GetData1() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::market_data::CThostFtdcDepthMarketDataField, ::market_data::MsgReply>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::market_data::CThostFtdcDepthMarketDataField, ::market_data::MsgReply>* streamer) { + return this->StreamedGetData1(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_GetData1() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status GetData1(::grpc::ServerContext* /*context*/, const ::market_data::CThostFtdcDepthMarketDataField* /*request*/, ::market_data::MsgReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGetData1(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::market_data::CThostFtdcDepthMarketDataField,::market_data::MsgReply>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_GetData2 : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_GetData2() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< + ::market_data::ResMsg, ::market_data::MsgReply>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::market_data::ResMsg, ::market_data::MsgReply>* streamer) { + return this->StreamedGetData2(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_GetData2() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status GetData2(::grpc::ServerContext* /*context*/, const ::market_data::ResMsg* /*request*/, ::market_data::MsgReply* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGetData2(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::market_data::ResMsg,::market_data::MsgReply>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_GetData1 > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_GetData1 > StreamedService; +}; + +} // namespace market_data + + +#endif // GRPC_market_5fdata_2eproto__INCLUDED diff --git a/protoc/market_data.pb.cc b/protoc/market_data.pb.cc new file mode 100644 index 0000000..78da5d2 --- /dev/null +++ b/protoc/market_data.pb.cc @@ -0,0 +1,2203 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: market_data.proto +// Protobuf C++ Version: 5.28.1 + +#include "market_data.pb.h" + +#include +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/generated_message_tctable_impl.h" +#include "google/protobuf/extension_set.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 market_data { + +inline constexpr ResMsg::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : other_params_{}, + other_msg_{}, + signame_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + instrumentid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + offset_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + dir_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + sigvalue_{0}, + sigflag_{0}, + vol_{0}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR ResMsg::ResMsg(::_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 ResMsgDefaultTypeInternal { + PROTOBUF_CONSTEXPR ResMsgDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ResMsgDefaultTypeInternal() {} + union { + ResMsg _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResMsgDefaultTypeInternal _ResMsg_default_instance_; + +inline constexpr MsgReply::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : message_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR MsgReply::MsgReply(::_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 MsgReplyDefaultTypeInternal { + PROTOBUF_CONSTEXPR MsgReplyDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~MsgReplyDefaultTypeInternal() {} + union { + MsgReply _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MsgReplyDefaultTypeInternal _MsgReply_default_instance_; + +inline constexpr CThostFtdcDepthMarketDataField::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : tradingday_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + reserve1_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + exchangeid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + reserve2_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + updatetime_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + actionday_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + instrumentid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + exchangeinstid_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + lastprice_{0}, + presettlementprice_{0}, + precloseprice_{0}, + preopeninterest_{0}, + openprice_{0}, + highestprice_{0}, + lowestprice_{0}, + turnover_{0}, + openinterest_{0}, + closeprice_{0}, + settlementprice_{0}, + upperlimitprice_{0}, + volume_{0}, + updatemillisec_{0}, + lowerlimitprice_{0}, + predelta_{0}, + currdelta_{0}, + bidprice1_{0}, + askprice1_{0}, + bidvolume1_{0}, + askvolume1_{0}, + bidprice2_{0}, + askprice2_{0}, + bidvolume2_{0}, + askvolume2_{0}, + bidprice3_{0}, + askprice3_{0}, + bidvolume3_{0}, + askvolume3_{0}, + bidprice4_{0}, + askprice4_{0}, + bidvolume4_{0}, + askvolume4_{0}, + bidprice5_{0}, + askprice5_{0}, + bidvolume5_{0}, + askvolume5_{0}, + averageprice_{0}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR CThostFtdcDepthMarketDataField::CThostFtdcDepthMarketDataField(::_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 CThostFtdcDepthMarketDataFieldDefaultTypeInternal { + PROTOBUF_CONSTEXPR CThostFtdcDepthMarketDataFieldDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~CThostFtdcDepthMarketDataFieldDefaultTypeInternal() {} + union { + CThostFtdcDepthMarketDataField _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CThostFtdcDepthMarketDataFieldDefaultTypeInternal _CThostFtdcDepthMarketDataField_default_instance_; +} // namespace market_data +static constexpr const ::_pb::EnumDescriptor** + file_level_enum_descriptors_market_5fdata_2eproto = nullptr; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_market_5fdata_2eproto = nullptr; +const ::uint32_t + TableStruct_market_5fdata_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _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(::market_data::CThostFtdcDepthMarketDataField, _impl_.tradingday_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.reserve1_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.exchangeid_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.reserve2_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.lastprice_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.presettlementprice_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.precloseprice_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.preopeninterest_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.openprice_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.highestprice_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.lowestprice_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.volume_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.turnover_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.openinterest_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.closeprice_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.settlementprice_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.upperlimitprice_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.lowerlimitprice_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.predelta_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.currdelta_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.updatetime_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.updatemillisec_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.bidprice1_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.bidvolume1_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.askprice1_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.askvolume1_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.bidprice2_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.bidvolume2_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.askprice2_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.askvolume2_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.bidprice3_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.bidvolume3_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.askprice3_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.askvolume3_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.bidprice4_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.bidvolume4_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.askprice4_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.askvolume4_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.bidprice5_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.bidvolume5_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.askprice5_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.askvolume5_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.averageprice_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.actionday_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.instrumentid_), + PROTOBUF_FIELD_OFFSET(::market_data::CThostFtdcDepthMarketDataField, _impl_.exchangeinstid_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::market_data::ResMsg, _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(::market_data::ResMsg, _impl_.signame_), + PROTOBUF_FIELD_OFFSET(::market_data::ResMsg, _impl_.instrumentid_), + PROTOBUF_FIELD_OFFSET(::market_data::ResMsg, _impl_.sigflag_), + PROTOBUF_FIELD_OFFSET(::market_data::ResMsg, _impl_.sigvalue_), + PROTOBUF_FIELD_OFFSET(::market_data::ResMsg, _impl_.offset_), + PROTOBUF_FIELD_OFFSET(::market_data::ResMsg, _impl_.dir_), + PROTOBUF_FIELD_OFFSET(::market_data::ResMsg, _impl_.vol_), + PROTOBUF_FIELD_OFFSET(::market_data::ResMsg, _impl_.other_params_), + PROTOBUF_FIELD_OFFSET(::market_data::ResMsg, _impl_.other_msg_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::market_data::MsgReply, _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(::market_data::MsgReply, _impl_.message_), +}; + +static const ::_pbi::MigrationSchema + schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, -1, -1, sizeof(::market_data::CThostFtdcDepthMarketDataField)}, + {54, -1, -1, sizeof(::market_data::ResMsg)}, + {71, -1, -1, sizeof(::market_data::MsgReply)}, +}; +static const ::_pb::Message* const file_default_instances[] = { + &::market_data::_CThostFtdcDepthMarketDataField_default_instance_._instance, + &::market_data::_ResMsg_default_instance_._instance, + &::market_data::_MsgReply_default_instance_._instance, +}; +const char descriptor_table_protodef_market_5fdata_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + "\n\021market_data.proto\022\013market_data\"\316\007\n\036CTh" + "ostFtdcDepthMarketDataField\022\022\n\nTradingDa" + "y\030\001 \001(\t\022\020\n\010reserve1\030\002 \001(\t\022\022\n\nExchangeID\030" + "\003 \001(\t\022\020\n\010reserve2\030\004 \001(\t\022\021\n\tLastPrice\030\005 \001" + "(\001\022\032\n\022PreSettlementPrice\030\006 \001(\001\022\025\n\rPreClo" + "sePrice\030\007 \001(\001\022\027\n\017PreOpenInterest\030\010 \001(\001\022\021" + "\n\tOpenPrice\030\t \001(\001\022\024\n\014HighestPrice\030\n \001(\001\022" + "\023\n\013LowestPrice\030\013 \001(\001\022\016\n\006Volume\030\014 \001(\005\022\020\n\010" + "Turnover\030\r \001(\001\022\024\n\014OpenInterest\030\016 \001(\001\022\022\n\n" + "ClosePrice\030\017 \001(\001\022\027\n\017SettlementPrice\030\020 \001(" + "\001\022\027\n\017UpperLimitPrice\030\021 \001(\001\022\027\n\017LowerLimit" + "Price\030\022 \001(\001\022\020\n\010PreDelta\030\023 \001(\001\022\021\n\tCurrDel" + "ta\030\024 \001(\001\022\022\n\nUpdateTime\030\025 \001(\t\022\026\n\016UpdateMi" + "llisec\030\026 \001(\005\022\021\n\tBidPrice1\030\027 \001(\001\022\022\n\nBidVo" + "lume1\030\030 \001(\005\022\021\n\tAskPrice1\030\031 \001(\001\022\022\n\nAskVol" + "ume1\030\032 \001(\005\022\021\n\tBidPrice2\030\033 \001(\001\022\022\n\nBidVolu" + "me2\030\034 \001(\005\022\021\n\tAskPrice2\030\035 \001(\001\022\022\n\nAskVolum" + "e2\030\036 \001(\005\022\021\n\tBidPrice3\030\037 \001(\001\022\022\n\nBidVolume" + "3\030 \001(\005\022\021\n\tAskPrice3\030! \001(\001\022\022\n\nAskVolume3" + "\030\" \001(\005\022\021\n\tBidPrice4\030# \001(\001\022\022\n\nBidVolume4\030" + "$ \001(\005\022\021\n\tAskPrice4\030% \001(\001\022\022\n\nAskVolume4\030&" + " \001(\005\022\021\n\tBidPrice5\030\' \001(\001\022\022\n\nBidVolume5\030( " + "\001(\005\022\021\n\tAskPrice5\030) \001(\001\022\022\n\nAskVolume5\030* \001" + "(\005\022\024\n\014AveragePrice\030+ \001(\001\022\021\n\tActionDay\030, " + "\001(\t\022\024\n\014InstrumentID\030- \001(\t\022\026\n\016ExchangeIns" + "tID\030. \001(\t\"\245\001\n\006ResMsg\022\017\n\007signame\030\001 \001(\t\022\024\n" + "\014InstrumentID\030\002 \001(\t\022\017\n\007sigflag\030\003 \001(\005\022\020\n\010" + "sigvalue\030\004 \001(\001\022\016\n\006offset\030\005 \001(\t\022\013\n\003dir\030\006 " + "\001(\t\022\013\n\003vol\030\007 \001(\005\022\024\n\014other_params\030\010 \003(\001\022\021" + "\n\tother_msg\030\t \003(\t\"\033\n\010MsgReply\022\017\n\007message" + "\030\001 \001(\t2\231\001\n\013TestService\022P\n\010GetData1\022+.mar" + "ket_data.CThostFtdcDepthMarketDataField\032" + "\025.market_data.MsgReply\"\000\0228\n\010GetData2\022\023.m" + "arket_data.ResMsg\032\025.market_data.MsgReply" + "\"\000B2\n\033io.grpc.example.market_dataB\013marke" + "t_dataP\001\242\002\003HLWb\006proto3" +}; +static ::absl::once_flag descriptor_table_market_5fdata_2eproto_once; +PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_market_5fdata_2eproto = { + false, + false, + 1422, + descriptor_table_protodef_market_5fdata_2eproto, + "market_data.proto", + &descriptor_table_market_5fdata_2eproto_once, + nullptr, + 0, + 3, + schemas, + file_default_instances, + TableStruct_market_5fdata_2eproto::offsets, + file_level_enum_descriptors_market_5fdata_2eproto, + file_level_service_descriptors_market_5fdata_2eproto, +}; +namespace market_data { +// =================================================================== + +class CThostFtdcDepthMarketDataField::_Internal { + public: +}; + +CThostFtdcDepthMarketDataField::CThostFtdcDepthMarketDataField(::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:market_data.CThostFtdcDepthMarketDataField) +} +inline PROTOBUF_NDEBUG_INLINE CThostFtdcDepthMarketDataField::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::market_data::CThostFtdcDepthMarketDataField& from_msg) + : tradingday_(arena, from.tradingday_), + reserve1_(arena, from.reserve1_), + exchangeid_(arena, from.exchangeid_), + reserve2_(arena, from.reserve2_), + updatetime_(arena, from.updatetime_), + actionday_(arena, from.actionday_), + instrumentid_(arena, from.instrumentid_), + exchangeinstid_(arena, from.exchangeinstid_), + _cached_size_{0} {} + +CThostFtdcDepthMarketDataField::CThostFtdcDepthMarketDataField( + ::google::protobuf::Arena* arena, + const CThostFtdcDepthMarketDataField& 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 + CThostFtdcDepthMarketDataField* 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(&_impl_) + + offsetof(Impl_, lastprice_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, lastprice_), + offsetof(Impl_, averageprice_) - + offsetof(Impl_, lastprice_) + + sizeof(Impl_::averageprice_)); + + // @@protoc_insertion_point(copy_constructor:market_data.CThostFtdcDepthMarketDataField) +} +inline PROTOBUF_NDEBUG_INLINE CThostFtdcDepthMarketDataField::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : tradingday_(arena), + reserve1_(arena), + exchangeid_(arena), + reserve2_(arena), + updatetime_(arena), + actionday_(arena), + instrumentid_(arena), + exchangeinstid_(arena), + _cached_size_{0} {} + +inline void CThostFtdcDepthMarketDataField::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, lastprice_), + 0, + offsetof(Impl_, averageprice_) - + offsetof(Impl_, lastprice_) + + sizeof(Impl_::averageprice_)); +} +CThostFtdcDepthMarketDataField::~CThostFtdcDepthMarketDataField() { + // @@protoc_insertion_point(destructor:market_data.CThostFtdcDepthMarketDataField) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void CThostFtdcDepthMarketDataField::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.tradingday_.Destroy(); + _impl_.reserve1_.Destroy(); + _impl_.exchangeid_.Destroy(); + _impl_.reserve2_.Destroy(); + _impl_.updatetime_.Destroy(); + _impl_.actionday_.Destroy(); + _impl_.instrumentid_.Destroy(); + _impl_.exchangeinstid_.Destroy(); + _impl_.~Impl_(); +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::MessageLite::ClassDataFull + CThostFtdcDepthMarketDataField::_class_data_ = { + ::google::protobuf::Message::ClassData{ + &_CThostFtdcDepthMarketDataField_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &CThostFtdcDepthMarketDataField::MergeImpl, +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::google::protobuf::Message::GetDeleteImpl(), + ::google::protobuf::Message::GetNewImpl(), + ::google::protobuf::Message::GetClearImpl(), &CThostFtdcDepthMarketDataField::ByteSizeLong, + &CThostFtdcDepthMarketDataField::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_._cached_size_), + false, + }, + &CThostFtdcDepthMarketDataField::kDescriptorMethods, + &descriptor_table_market_5fdata_2eproto, + nullptr, // tracker +}; +const ::google::protobuf::MessageLite::ClassData* CThostFtdcDepthMarketDataField::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<5, 46, 0, 172, 7> CThostFtdcDepthMarketDataField::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 46, 248, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 0, // skipmap + offsetof(decltype(_table_), field_entries), + 46, // 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<::market_data::CThostFtdcDepthMarketDataField>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // string TradingDay = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.tradingday_)}}, + // string reserve1 = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.reserve1_)}}, + // string ExchangeID = 3; + {::_pbi::TcParser::FastUS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.exchangeid_)}}, + // string reserve2 = 4; + {::_pbi::TcParser::FastUS1, + {34, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.reserve2_)}}, + // double LastPrice = 5; + {::_pbi::TcParser::FastF64S1, + {41, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.lastprice_)}}, + // double PreSettlementPrice = 6; + {::_pbi::TcParser::FastF64S1, + {49, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.presettlementprice_)}}, + // double PreClosePrice = 7; + {::_pbi::TcParser::FastF64S1, + {57, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.precloseprice_)}}, + // double PreOpenInterest = 8; + {::_pbi::TcParser::FastF64S1, + {65, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.preopeninterest_)}}, + // double OpenPrice = 9; + {::_pbi::TcParser::FastF64S1, + {73, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.openprice_)}}, + // double HighestPrice = 10; + {::_pbi::TcParser::FastF64S1, + {81, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.highestprice_)}}, + // double LowestPrice = 11; + {::_pbi::TcParser::FastF64S1, + {89, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.lowestprice_)}}, + // int32 Volume = 12; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(CThostFtdcDepthMarketDataField, _impl_.volume_), 63>(), + {96, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.volume_)}}, + // double Turnover = 13; + {::_pbi::TcParser::FastF64S1, + {105, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.turnover_)}}, + // double OpenInterest = 14; + {::_pbi::TcParser::FastF64S1, + {113, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.openinterest_)}}, + // double ClosePrice = 15; + {::_pbi::TcParser::FastF64S1, + {121, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.closeprice_)}}, + // double SettlementPrice = 16; + {::_pbi::TcParser::FastF64S2, + {385, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.settlementprice_)}}, + // double UpperLimitPrice = 17; + {::_pbi::TcParser::FastF64S2, + {393, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.upperlimitprice_)}}, + // double LowerLimitPrice = 18; + {::_pbi::TcParser::FastF64S2, + {401, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.lowerlimitprice_)}}, + // double PreDelta = 19; + {::_pbi::TcParser::FastF64S2, + {409, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.predelta_)}}, + // double CurrDelta = 20; + {::_pbi::TcParser::FastF64S2, + {417, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.currdelta_)}}, + // string UpdateTime = 21; + {::_pbi::TcParser::FastUS2, + {426, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.updatetime_)}}, + // int32 UpdateMillisec = 22; + {::_pbi::TcParser::FastV32S2, + {432, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.updatemillisec_)}}, + // double BidPrice1 = 23; + {::_pbi::TcParser::FastF64S2, + {441, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidprice1_)}}, + // int32 BidVolume1 = 24; + {::_pbi::TcParser::FastV32S2, + {448, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidvolume1_)}}, + // double AskPrice1 = 25; + {::_pbi::TcParser::FastF64S2, + {457, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.askprice1_)}}, + // int32 AskVolume1 = 26; + {::_pbi::TcParser::FastV32S2, + {464, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.askvolume1_)}}, + // double BidPrice2 = 27; + {::_pbi::TcParser::FastF64S2, + {473, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidprice2_)}}, + // int32 BidVolume2 = 28; + {::_pbi::TcParser::FastV32S2, + {480, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidvolume2_)}}, + // double AskPrice2 = 29; + {::_pbi::TcParser::FastF64S2, + {489, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.askprice2_)}}, + // int32 AskVolume2 = 30; + {::_pbi::TcParser::FastV32S2, + {496, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.askvolume2_)}}, + // double BidPrice3 = 31; + {::_pbi::TcParser::FastF64S2, + {505, 63, 0, PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidprice3_)}}, + }}, {{ + 33, 0, 1, + 49152, 32, + 65535, 65535 + }}, {{ + // string TradingDay = 1; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.tradingday_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string reserve1 = 2; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.reserve1_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string ExchangeID = 3; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.exchangeid_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string reserve2 = 4; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.reserve2_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // double LastPrice = 5; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.lastprice_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // double PreSettlementPrice = 6; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.presettlementprice_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // double PreClosePrice = 7; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.precloseprice_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // double PreOpenInterest = 8; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.preopeninterest_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // double OpenPrice = 9; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.openprice_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // double HighestPrice = 10; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.highestprice_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // double LowestPrice = 11; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.lowestprice_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // int32 Volume = 12; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.volume_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + // double Turnover = 13; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.turnover_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // double OpenInterest = 14; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.openinterest_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // double ClosePrice = 15; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.closeprice_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // double SettlementPrice = 16; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.settlementprice_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // double UpperLimitPrice = 17; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.upperlimitprice_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // double LowerLimitPrice = 18; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.lowerlimitprice_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // double PreDelta = 19; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.predelta_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // double CurrDelta = 20; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.currdelta_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // string UpdateTime = 21; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.updatetime_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // int32 UpdateMillisec = 22; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.updatemillisec_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + // double BidPrice1 = 23; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidprice1_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // int32 BidVolume1 = 24; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidvolume1_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + // double AskPrice1 = 25; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.askprice1_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // int32 AskVolume1 = 26; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.askvolume1_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + // double BidPrice2 = 27; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidprice2_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // int32 BidVolume2 = 28; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidvolume2_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + // double AskPrice2 = 29; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.askprice2_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // int32 AskVolume2 = 30; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.askvolume2_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + // double BidPrice3 = 31; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidprice3_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // int32 BidVolume3 = 32; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidvolume3_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + // double AskPrice3 = 33; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.askprice3_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // int32 AskVolume3 = 34; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.askvolume3_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + // double BidPrice4 = 35; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidprice4_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // int32 BidVolume4 = 36; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidvolume4_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + // double AskPrice4 = 37; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.askprice4_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // int32 AskVolume4 = 38; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.askvolume4_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + // double BidPrice5 = 39; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidprice5_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // int32 BidVolume5 = 40; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.bidvolume5_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + // double AskPrice5 = 41; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.askprice5_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // int32 AskVolume5 = 42; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.askvolume5_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + // double AveragePrice = 43; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.averageprice_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // string ActionDay = 44; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.actionday_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string InstrumentID = 45; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.instrumentid_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string ExchangeInstID = 46; + {PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.exchangeinstid_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\52\12\10\12\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\11\14\16\0" + "market_data.CThostFtdcDepthMarketDataField" + "TradingDay" + "reserve1" + "ExchangeID" + "reserve2" + "UpdateTime" + "ActionDay" + "InstrumentID" + "ExchangeInstID" + }}, +}; + +PROTOBUF_NOINLINE void CThostFtdcDepthMarketDataField::Clear() { +// @@protoc_insertion_point(message_clear_start:market_data.CThostFtdcDepthMarketDataField) + ::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_.tradingday_.ClearToEmpty(); + _impl_.reserve1_.ClearToEmpty(); + _impl_.exchangeid_.ClearToEmpty(); + _impl_.reserve2_.ClearToEmpty(); + _impl_.updatetime_.ClearToEmpty(); + _impl_.actionday_.ClearToEmpty(); + _impl_.instrumentid_.ClearToEmpty(); + _impl_.exchangeinstid_.ClearToEmpty(); + ::memset(&_impl_.lastprice_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.averageprice_) - + reinterpret_cast(&_impl_.lastprice_)) + sizeof(_impl_.averageprice_)); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* CThostFtdcDepthMarketDataField::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const CThostFtdcDepthMarketDataField& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* CThostFtdcDepthMarketDataField::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const CThostFtdcDepthMarketDataField& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:market_data.CThostFtdcDepthMarketDataField) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string TradingDay = 1; + if (!this_._internal_tradingday().empty()) { + const std::string& _s = this_._internal_tradingday(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "market_data.CThostFtdcDepthMarketDataField.TradingDay"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // string reserve1 = 2; + if (!this_._internal_reserve1().empty()) { + const std::string& _s = this_._internal_reserve1(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "market_data.CThostFtdcDepthMarketDataField.reserve1"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // string ExchangeID = 3; + if (!this_._internal_exchangeid().empty()) { + const std::string& _s = this_._internal_exchangeid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "market_data.CThostFtdcDepthMarketDataField.ExchangeID"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + + // string reserve2 = 4; + if (!this_._internal_reserve2().empty()) { + const std::string& _s = this_._internal_reserve2(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "market_data.CThostFtdcDepthMarketDataField.reserve2"); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + + // double LastPrice = 5; + if (::absl::bit_cast<::uint64_t>(this_._internal_lastprice()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 5, this_._internal_lastprice(), target); + } + + // double PreSettlementPrice = 6; + if (::absl::bit_cast<::uint64_t>(this_._internal_presettlementprice()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 6, this_._internal_presettlementprice(), target); + } + + // double PreClosePrice = 7; + if (::absl::bit_cast<::uint64_t>(this_._internal_precloseprice()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 7, this_._internal_precloseprice(), target); + } + + // double PreOpenInterest = 8; + if (::absl::bit_cast<::uint64_t>(this_._internal_preopeninterest()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 8, this_._internal_preopeninterest(), target); + } + + // double OpenPrice = 9; + if (::absl::bit_cast<::uint64_t>(this_._internal_openprice()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 9, this_._internal_openprice(), target); + } + + // double HighestPrice = 10; + if (::absl::bit_cast<::uint64_t>(this_._internal_highestprice()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 10, this_._internal_highestprice(), target); + } + + // double LowestPrice = 11; + if (::absl::bit_cast<::uint64_t>(this_._internal_lowestprice()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 11, this_._internal_lowestprice(), target); + } + + // int32 Volume = 12; + if (this_._internal_volume() != 0) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<12>( + stream, this_._internal_volume(), target); + } + + // double Turnover = 13; + if (::absl::bit_cast<::uint64_t>(this_._internal_turnover()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 13, this_._internal_turnover(), target); + } + + // double OpenInterest = 14; + if (::absl::bit_cast<::uint64_t>(this_._internal_openinterest()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 14, this_._internal_openinterest(), target); + } + + // double ClosePrice = 15; + if (::absl::bit_cast<::uint64_t>(this_._internal_closeprice()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 15, this_._internal_closeprice(), target); + } + + // double SettlementPrice = 16; + if (::absl::bit_cast<::uint64_t>(this_._internal_settlementprice()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 16, this_._internal_settlementprice(), target); + } + + // double UpperLimitPrice = 17; + if (::absl::bit_cast<::uint64_t>(this_._internal_upperlimitprice()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 17, this_._internal_upperlimitprice(), target); + } + + // double LowerLimitPrice = 18; + if (::absl::bit_cast<::uint64_t>(this_._internal_lowerlimitprice()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 18, this_._internal_lowerlimitprice(), target); + } + + // double PreDelta = 19; + if (::absl::bit_cast<::uint64_t>(this_._internal_predelta()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 19, this_._internal_predelta(), target); + } + + // double CurrDelta = 20; + if (::absl::bit_cast<::uint64_t>(this_._internal_currdelta()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 20, this_._internal_currdelta(), target); + } + + // string UpdateTime = 21; + if (!this_._internal_updatetime().empty()) { + const std::string& _s = this_._internal_updatetime(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "market_data.CThostFtdcDepthMarketDataField.UpdateTime"); + target = stream->WriteStringMaybeAliased(21, _s, target); + } + + // int32 UpdateMillisec = 22; + if (this_._internal_updatemillisec() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray( + 22, this_._internal_updatemillisec(), target); + } + + // double BidPrice1 = 23; + if (::absl::bit_cast<::uint64_t>(this_._internal_bidprice1()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 23, this_._internal_bidprice1(), target); + } + + // int32 BidVolume1 = 24; + if (this_._internal_bidvolume1() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray( + 24, this_._internal_bidvolume1(), target); + } + + // double AskPrice1 = 25; + if (::absl::bit_cast<::uint64_t>(this_._internal_askprice1()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 25, this_._internal_askprice1(), target); + } + + // int32 AskVolume1 = 26; + if (this_._internal_askvolume1() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray( + 26, this_._internal_askvolume1(), target); + } + + // double BidPrice2 = 27; + if (::absl::bit_cast<::uint64_t>(this_._internal_bidprice2()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 27, this_._internal_bidprice2(), target); + } + + // int32 BidVolume2 = 28; + if (this_._internal_bidvolume2() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray( + 28, this_._internal_bidvolume2(), target); + } + + // double AskPrice2 = 29; + if (::absl::bit_cast<::uint64_t>(this_._internal_askprice2()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 29, this_._internal_askprice2(), target); + } + + // int32 AskVolume2 = 30; + if (this_._internal_askvolume2() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray( + 30, this_._internal_askvolume2(), target); + } + + // double BidPrice3 = 31; + if (::absl::bit_cast<::uint64_t>(this_._internal_bidprice3()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 31, this_._internal_bidprice3(), target); + } + + // int32 BidVolume3 = 32; + if (this_._internal_bidvolume3() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray( + 32, this_._internal_bidvolume3(), target); + } + + // double AskPrice3 = 33; + if (::absl::bit_cast<::uint64_t>(this_._internal_askprice3()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 33, this_._internal_askprice3(), target); + } + + // int32 AskVolume3 = 34; + if (this_._internal_askvolume3() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray( + 34, this_._internal_askvolume3(), target); + } + + // double BidPrice4 = 35; + if (::absl::bit_cast<::uint64_t>(this_._internal_bidprice4()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 35, this_._internal_bidprice4(), target); + } + + // int32 BidVolume4 = 36; + if (this_._internal_bidvolume4() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray( + 36, this_._internal_bidvolume4(), target); + } + + // double AskPrice4 = 37; + if (::absl::bit_cast<::uint64_t>(this_._internal_askprice4()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 37, this_._internal_askprice4(), target); + } + + // int32 AskVolume4 = 38; + if (this_._internal_askvolume4() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray( + 38, this_._internal_askvolume4(), target); + } + + // double BidPrice5 = 39; + if (::absl::bit_cast<::uint64_t>(this_._internal_bidprice5()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 39, this_._internal_bidprice5(), target); + } + + // int32 BidVolume5 = 40; + if (this_._internal_bidvolume5() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray( + 40, this_._internal_bidvolume5(), target); + } + + // double AskPrice5 = 41; + if (::absl::bit_cast<::uint64_t>(this_._internal_askprice5()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 41, this_._internal_askprice5(), target); + } + + // int32 AskVolume5 = 42; + if (this_._internal_askvolume5() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray( + 42, this_._internal_askvolume5(), target); + } + + // double AveragePrice = 43; + if (::absl::bit_cast<::uint64_t>(this_._internal_averageprice()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 43, this_._internal_averageprice(), target); + } + + // string ActionDay = 44; + if (!this_._internal_actionday().empty()) { + const std::string& _s = this_._internal_actionday(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "market_data.CThostFtdcDepthMarketDataField.ActionDay"); + target = stream->WriteStringMaybeAliased(44, _s, target); + } + + // string InstrumentID = 45; + if (!this_._internal_instrumentid().empty()) { + const std::string& _s = this_._internal_instrumentid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "market_data.CThostFtdcDepthMarketDataField.InstrumentID"); + target = stream->WriteStringMaybeAliased(45, _s, target); + } + + // string ExchangeInstID = 46; + if (!this_._internal_exchangeinstid().empty()) { + const std::string& _s = this_._internal_exchangeinstid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "market_data.CThostFtdcDepthMarketDataField.ExchangeInstID"); + target = stream->WriteStringMaybeAliased(46, _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:market_data.CThostFtdcDepthMarketDataField) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t CThostFtdcDepthMarketDataField::ByteSizeLong(const MessageLite& base) { + const CThostFtdcDepthMarketDataField& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t CThostFtdcDepthMarketDataField::ByteSizeLong() const { + const CThostFtdcDepthMarketDataField& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:market_data.CThostFtdcDepthMarketDataField) + ::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 TradingDay = 1; + if (!this_._internal_tradingday().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_tradingday()); + } + // string reserve1 = 2; + if (!this_._internal_reserve1().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_reserve1()); + } + // string ExchangeID = 3; + if (!this_._internal_exchangeid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_exchangeid()); + } + // string reserve2 = 4; + if (!this_._internal_reserve2().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_reserve2()); + } + // string UpdateTime = 21; + if (!this_._internal_updatetime().empty()) { + total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_updatetime()); + } + // string ActionDay = 44; + if (!this_._internal_actionday().empty()) { + total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_actionday()); + } + // string InstrumentID = 45; + if (!this_._internal_instrumentid().empty()) { + total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_instrumentid()); + } + // string ExchangeInstID = 46; + if (!this_._internal_exchangeinstid().empty()) { + total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_exchangeinstid()); + } + // double LastPrice = 5; + if (::absl::bit_cast<::uint64_t>(this_._internal_lastprice()) != 0) { + total_size += 9; + } + // double PreSettlementPrice = 6; + if (::absl::bit_cast<::uint64_t>(this_._internal_presettlementprice()) != 0) { + total_size += 9; + } + // double PreClosePrice = 7; + if (::absl::bit_cast<::uint64_t>(this_._internal_precloseprice()) != 0) { + total_size += 9; + } + // double PreOpenInterest = 8; + if (::absl::bit_cast<::uint64_t>(this_._internal_preopeninterest()) != 0) { + total_size += 9; + } + // double OpenPrice = 9; + if (::absl::bit_cast<::uint64_t>(this_._internal_openprice()) != 0) { + total_size += 9; + } + // double HighestPrice = 10; + if (::absl::bit_cast<::uint64_t>(this_._internal_highestprice()) != 0) { + total_size += 9; + } + // double LowestPrice = 11; + if (::absl::bit_cast<::uint64_t>(this_._internal_lowestprice()) != 0) { + total_size += 9; + } + // double Turnover = 13; + if (::absl::bit_cast<::uint64_t>(this_._internal_turnover()) != 0) { + total_size += 9; + } + // double OpenInterest = 14; + if (::absl::bit_cast<::uint64_t>(this_._internal_openinterest()) != 0) { + total_size += 9; + } + // double ClosePrice = 15; + if (::absl::bit_cast<::uint64_t>(this_._internal_closeprice()) != 0) { + total_size += 9; + } + // double SettlementPrice = 16; + if (::absl::bit_cast<::uint64_t>(this_._internal_settlementprice()) != 0) { + total_size += 10; + } + // double UpperLimitPrice = 17; + if (::absl::bit_cast<::uint64_t>(this_._internal_upperlimitprice()) != 0) { + total_size += 10; + } + // int32 Volume = 12; + if (this_._internal_volume() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_volume()); + } + // int32 UpdateMillisec = 22; + if (this_._internal_updatemillisec() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::Int32Size( + this_._internal_updatemillisec()); + } + // double LowerLimitPrice = 18; + if (::absl::bit_cast<::uint64_t>(this_._internal_lowerlimitprice()) != 0) { + total_size += 10; + } + // double PreDelta = 19; + if (::absl::bit_cast<::uint64_t>(this_._internal_predelta()) != 0) { + total_size += 10; + } + // double CurrDelta = 20; + if (::absl::bit_cast<::uint64_t>(this_._internal_currdelta()) != 0) { + total_size += 10; + } + // double BidPrice1 = 23; + if (::absl::bit_cast<::uint64_t>(this_._internal_bidprice1()) != 0) { + total_size += 10; + } + // double AskPrice1 = 25; + if (::absl::bit_cast<::uint64_t>(this_._internal_askprice1()) != 0) { + total_size += 10; + } + // int32 BidVolume1 = 24; + if (this_._internal_bidvolume1() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::Int32Size( + this_._internal_bidvolume1()); + } + // int32 AskVolume1 = 26; + if (this_._internal_askvolume1() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::Int32Size( + this_._internal_askvolume1()); + } + // double BidPrice2 = 27; + if (::absl::bit_cast<::uint64_t>(this_._internal_bidprice2()) != 0) { + total_size += 10; + } + // double AskPrice2 = 29; + if (::absl::bit_cast<::uint64_t>(this_._internal_askprice2()) != 0) { + total_size += 10; + } + // int32 BidVolume2 = 28; + if (this_._internal_bidvolume2() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::Int32Size( + this_._internal_bidvolume2()); + } + // int32 AskVolume2 = 30; + if (this_._internal_askvolume2() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::Int32Size( + this_._internal_askvolume2()); + } + // double BidPrice3 = 31; + if (::absl::bit_cast<::uint64_t>(this_._internal_bidprice3()) != 0) { + total_size += 10; + } + // double AskPrice3 = 33; + if (::absl::bit_cast<::uint64_t>(this_._internal_askprice3()) != 0) { + total_size += 10; + } + // int32 BidVolume3 = 32; + if (this_._internal_bidvolume3() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::Int32Size( + this_._internal_bidvolume3()); + } + // int32 AskVolume3 = 34; + if (this_._internal_askvolume3() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::Int32Size( + this_._internal_askvolume3()); + } + // double BidPrice4 = 35; + if (::absl::bit_cast<::uint64_t>(this_._internal_bidprice4()) != 0) { + total_size += 10; + } + // double AskPrice4 = 37; + if (::absl::bit_cast<::uint64_t>(this_._internal_askprice4()) != 0) { + total_size += 10; + } + // int32 BidVolume4 = 36; + if (this_._internal_bidvolume4() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::Int32Size( + this_._internal_bidvolume4()); + } + // int32 AskVolume4 = 38; + if (this_._internal_askvolume4() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::Int32Size( + this_._internal_askvolume4()); + } + // double BidPrice5 = 39; + if (::absl::bit_cast<::uint64_t>(this_._internal_bidprice5()) != 0) { + total_size += 10; + } + // double AskPrice5 = 41; + if (::absl::bit_cast<::uint64_t>(this_._internal_askprice5()) != 0) { + total_size += 10; + } + // int32 BidVolume5 = 40; + if (this_._internal_bidvolume5() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::Int32Size( + this_._internal_bidvolume5()); + } + // int32 AskVolume5 = 42; + if (this_._internal_askvolume5() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::Int32Size( + this_._internal_askvolume5()); + } + // double AveragePrice = 43; + if (::absl::bit_cast<::uint64_t>(this_._internal_averageprice()) != 0) { + total_size += 10; + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } + +void CThostFtdcDepthMarketDataField::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:market_data.CThostFtdcDepthMarketDataField) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_tradingday().empty()) { + _this->_internal_set_tradingday(from._internal_tradingday()); + } + if (!from._internal_reserve1().empty()) { + _this->_internal_set_reserve1(from._internal_reserve1()); + } + if (!from._internal_exchangeid().empty()) { + _this->_internal_set_exchangeid(from._internal_exchangeid()); + } + if (!from._internal_reserve2().empty()) { + _this->_internal_set_reserve2(from._internal_reserve2()); + } + if (!from._internal_updatetime().empty()) { + _this->_internal_set_updatetime(from._internal_updatetime()); + } + if (!from._internal_actionday().empty()) { + _this->_internal_set_actionday(from._internal_actionday()); + } + if (!from._internal_instrumentid().empty()) { + _this->_internal_set_instrumentid(from._internal_instrumentid()); + } + if (!from._internal_exchangeinstid().empty()) { + _this->_internal_set_exchangeinstid(from._internal_exchangeinstid()); + } + if (::absl::bit_cast<::uint64_t>(from._internal_lastprice()) != 0) { + _this->_impl_.lastprice_ = from._impl_.lastprice_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_presettlementprice()) != 0) { + _this->_impl_.presettlementprice_ = from._impl_.presettlementprice_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_precloseprice()) != 0) { + _this->_impl_.precloseprice_ = from._impl_.precloseprice_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_preopeninterest()) != 0) { + _this->_impl_.preopeninterest_ = from._impl_.preopeninterest_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_openprice()) != 0) { + _this->_impl_.openprice_ = from._impl_.openprice_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_highestprice()) != 0) { + _this->_impl_.highestprice_ = from._impl_.highestprice_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_lowestprice()) != 0) { + _this->_impl_.lowestprice_ = from._impl_.lowestprice_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_turnover()) != 0) { + _this->_impl_.turnover_ = from._impl_.turnover_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_openinterest()) != 0) { + _this->_impl_.openinterest_ = from._impl_.openinterest_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_closeprice()) != 0) { + _this->_impl_.closeprice_ = from._impl_.closeprice_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_settlementprice()) != 0) { + _this->_impl_.settlementprice_ = from._impl_.settlementprice_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_upperlimitprice()) != 0) { + _this->_impl_.upperlimitprice_ = from._impl_.upperlimitprice_; + } + if (from._internal_volume() != 0) { + _this->_impl_.volume_ = from._impl_.volume_; + } + if (from._internal_updatemillisec() != 0) { + _this->_impl_.updatemillisec_ = from._impl_.updatemillisec_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_lowerlimitprice()) != 0) { + _this->_impl_.lowerlimitprice_ = from._impl_.lowerlimitprice_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_predelta()) != 0) { + _this->_impl_.predelta_ = from._impl_.predelta_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_currdelta()) != 0) { + _this->_impl_.currdelta_ = from._impl_.currdelta_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_bidprice1()) != 0) { + _this->_impl_.bidprice1_ = from._impl_.bidprice1_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_askprice1()) != 0) { + _this->_impl_.askprice1_ = from._impl_.askprice1_; + } + if (from._internal_bidvolume1() != 0) { + _this->_impl_.bidvolume1_ = from._impl_.bidvolume1_; + } + if (from._internal_askvolume1() != 0) { + _this->_impl_.askvolume1_ = from._impl_.askvolume1_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_bidprice2()) != 0) { + _this->_impl_.bidprice2_ = from._impl_.bidprice2_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_askprice2()) != 0) { + _this->_impl_.askprice2_ = from._impl_.askprice2_; + } + if (from._internal_bidvolume2() != 0) { + _this->_impl_.bidvolume2_ = from._impl_.bidvolume2_; + } + if (from._internal_askvolume2() != 0) { + _this->_impl_.askvolume2_ = from._impl_.askvolume2_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_bidprice3()) != 0) { + _this->_impl_.bidprice3_ = from._impl_.bidprice3_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_askprice3()) != 0) { + _this->_impl_.askprice3_ = from._impl_.askprice3_; + } + if (from._internal_bidvolume3() != 0) { + _this->_impl_.bidvolume3_ = from._impl_.bidvolume3_; + } + if (from._internal_askvolume3() != 0) { + _this->_impl_.askvolume3_ = from._impl_.askvolume3_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_bidprice4()) != 0) { + _this->_impl_.bidprice4_ = from._impl_.bidprice4_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_askprice4()) != 0) { + _this->_impl_.askprice4_ = from._impl_.askprice4_; + } + if (from._internal_bidvolume4() != 0) { + _this->_impl_.bidvolume4_ = from._impl_.bidvolume4_; + } + if (from._internal_askvolume4() != 0) { + _this->_impl_.askvolume4_ = from._impl_.askvolume4_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_bidprice5()) != 0) { + _this->_impl_.bidprice5_ = from._impl_.bidprice5_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_askprice5()) != 0) { + _this->_impl_.askprice5_ = from._impl_.askprice5_; + } + if (from._internal_bidvolume5() != 0) { + _this->_impl_.bidvolume5_ = from._impl_.bidvolume5_; + } + if (from._internal_askvolume5() != 0) { + _this->_impl_.askvolume5_ = from._impl_.askvolume5_; + } + if (::absl::bit_cast<::uint64_t>(from._internal_averageprice()) != 0) { + _this->_impl_.averageprice_ = from._impl_.averageprice_; + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void CThostFtdcDepthMarketDataField::CopyFrom(const CThostFtdcDepthMarketDataField& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:market_data.CThostFtdcDepthMarketDataField) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void CThostFtdcDepthMarketDataField::InternalSwap(CThostFtdcDepthMarketDataField* 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_.tradingday_, &other->_impl_.tradingday_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.reserve1_, &other->_impl_.reserve1_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.exchangeid_, &other->_impl_.exchangeid_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.reserve2_, &other->_impl_.reserve2_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.updatetime_, &other->_impl_.updatetime_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.actionday_, &other->_impl_.actionday_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.instrumentid_, &other->_impl_.instrumentid_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.exchangeinstid_, &other->_impl_.exchangeinstid_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.averageprice_) + + sizeof(CThostFtdcDepthMarketDataField::_impl_.averageprice_) + - PROTOBUF_FIELD_OFFSET(CThostFtdcDepthMarketDataField, _impl_.lastprice_)>( + reinterpret_cast(&_impl_.lastprice_), + reinterpret_cast(&other->_impl_.lastprice_)); +} + +::google::protobuf::Metadata CThostFtdcDepthMarketDataField::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class ResMsg::_Internal { + public: +}; + +ResMsg::ResMsg(::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:market_data.ResMsg) +} +inline PROTOBUF_NDEBUG_INLINE ResMsg::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::market_data::ResMsg& from_msg) + : other_params_{visibility, arena, from.other_params_}, + other_msg_{visibility, arena, from.other_msg_}, + signame_(arena, from.signame_), + instrumentid_(arena, from.instrumentid_), + offset_(arena, from.offset_), + dir_(arena, from.dir_), + _cached_size_{0} {} + +ResMsg::ResMsg( + ::google::protobuf::Arena* arena, + const ResMsg& 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 + ResMsg* 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(&_impl_) + + offsetof(Impl_, sigvalue_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, sigvalue_), + offsetof(Impl_, vol_) - + offsetof(Impl_, sigvalue_) + + sizeof(Impl_::vol_)); + + // @@protoc_insertion_point(copy_constructor:market_data.ResMsg) +} +inline PROTOBUF_NDEBUG_INLINE ResMsg::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : other_params_{visibility, arena}, + other_msg_{visibility, arena}, + signame_(arena), + instrumentid_(arena), + offset_(arena), + dir_(arena), + _cached_size_{0} {} + +inline void ResMsg::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, sigvalue_), + 0, + offsetof(Impl_, vol_) - + offsetof(Impl_, sigvalue_) + + sizeof(Impl_::vol_)); +} +ResMsg::~ResMsg() { + // @@protoc_insertion_point(destructor:market_data.ResMsg) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void ResMsg::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.signame_.Destroy(); + _impl_.instrumentid_.Destroy(); + _impl_.offset_.Destroy(); + _impl_.dir_.Destroy(); + _impl_.~Impl_(); +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::MessageLite::ClassDataFull + ResMsg::_class_data_ = { + ::google::protobuf::Message::ClassData{ + &_ResMsg_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &ResMsg::MergeImpl, +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::google::protobuf::Message::GetDeleteImpl(), + ::google::protobuf::Message::GetNewImpl(), + ::google::protobuf::Message::GetClearImpl(), &ResMsg::ByteSizeLong, + &ResMsg::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(ResMsg, _impl_._cached_size_), + false, + }, + &ResMsg::kDescriptorMethods, + &descriptor_table_market_5fdata_2eproto, + nullptr, // tracker +}; +const ::google::protobuf::MessageLite::ClassData* ResMsg::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<4, 9, 0, 72, 2> ResMsg::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 9, 120, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294966784, // skipmap + offsetof(decltype(_table_), field_entries), + 9, // 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<::market_data::ResMsg>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // string signame = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.signame_)}}, + // string InstrumentID = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.instrumentid_)}}, + // int32 sigflag = 3; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(ResMsg, _impl_.sigflag_), 63>(), + {24, 63, 0, PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.sigflag_)}}, + // double sigvalue = 4; + {::_pbi::TcParser::FastF64S1, + {33, 63, 0, PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.sigvalue_)}}, + // string offset = 5; + {::_pbi::TcParser::FastUS1, + {42, 63, 0, PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.offset_)}}, + // string dir = 6; + {::_pbi::TcParser::FastUS1, + {50, 63, 0, PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.dir_)}}, + // int32 vol = 7; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(ResMsg, _impl_.vol_), 63>(), + {56, 63, 0, PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.vol_)}}, + // repeated double other_params = 8; + {::_pbi::TcParser::FastF64P1, + {66, 63, 0, PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.other_params_)}}, + // repeated string other_msg = 9; + {::_pbi::TcParser::FastUR1, + {74, 63, 0, PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.other_msg_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // string signame = 1; + {PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.signame_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string InstrumentID = 2; + {PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.instrumentid_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // int32 sigflag = 3; + {PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.sigflag_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + // double sigvalue = 4; + {PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.sigvalue_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // string offset = 5; + {PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.offset_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string dir = 6; + {PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.dir_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // int32 vol = 7; + {PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.vol_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, + // repeated double other_params = 8; + {PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.other_params_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedDouble)}, + // repeated string other_msg = 9; + {PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.other_msg_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, + }}, + // no aux_entries + {{ + "\22\7\14\0\0\6\3\0\0\11\0\0\0\0\0\0" + "market_data.ResMsg" + "signame" + "InstrumentID" + "offset" + "dir" + "other_msg" + }}, +}; + +PROTOBUF_NOINLINE void ResMsg::Clear() { +// @@protoc_insertion_point(message_clear_start:market_data.ResMsg) + ::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_.other_params_.Clear(); + _impl_.other_msg_.Clear(); + _impl_.signame_.ClearToEmpty(); + _impl_.instrumentid_.ClearToEmpty(); + _impl_.offset_.ClearToEmpty(); + _impl_.dir_.ClearToEmpty(); + ::memset(&_impl_.sigvalue_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.vol_) - + reinterpret_cast(&_impl_.sigvalue_)) + sizeof(_impl_.vol_)); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* ResMsg::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const ResMsg& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* ResMsg::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const ResMsg& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:market_data.ResMsg) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string signame = 1; + if (!this_._internal_signame().empty()) { + const std::string& _s = this_._internal_signame(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "market_data.ResMsg.signame"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // string InstrumentID = 2; + if (!this_._internal_instrumentid().empty()) { + const std::string& _s = this_._internal_instrumentid(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "market_data.ResMsg.InstrumentID"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // int32 sigflag = 3; + if (this_._internal_sigflag() != 0) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<3>( + stream, this_._internal_sigflag(), target); + } + + // double sigvalue = 4; + if (::absl::bit_cast<::uint64_t>(this_._internal_sigvalue()) != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 4, this_._internal_sigvalue(), target); + } + + // string offset = 5; + if (!this_._internal_offset().empty()) { + const std::string& _s = this_._internal_offset(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "market_data.ResMsg.offset"); + target = stream->WriteStringMaybeAliased(5, _s, target); + } + + // string dir = 6; + if (!this_._internal_dir().empty()) { + const std::string& _s = this_._internal_dir(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "market_data.ResMsg.dir"); + target = stream->WriteStringMaybeAliased(6, _s, target); + } + + // int32 vol = 7; + if (this_._internal_vol() != 0) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<7>( + stream, this_._internal_vol(), target); + } + + // repeated double other_params = 8; + if (this_._internal_other_params_size() > 0) { + target = stream->WriteFixedPacked(8, this_._internal_other_params(), target); + } + + // repeated string other_msg = 9; + for (int i = 0, n = this_._internal_other_msg_size(); i < n; ++i) { + const auto& s = this_._internal_other_msg().Get(i); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "market_data.ResMsg.other_msg"); + target = stream->WriteString(9, 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:market_data.ResMsg) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t ResMsg::ByteSizeLong(const MessageLite& base) { + const ResMsg& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t ResMsg::ByteSizeLong() const { + const ResMsg& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:market_data.ResMsg) + ::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_); + { + // repeated double other_params = 8; + { + std::size_t data_size = std::size_t{8} * + ::_pbi::FromIntSize(this_._internal_other_params_size()) + ; + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // repeated string other_msg = 9; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_other_msg().size()); + for (int i = 0, n = this_._internal_other_msg().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_other_msg().Get(i)); + } + } + } + { + // string signame = 1; + if (!this_._internal_signame().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_signame()); + } + // string InstrumentID = 2; + if (!this_._internal_instrumentid().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_instrumentid()); + } + // string offset = 5; + if (!this_._internal_offset().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_offset()); + } + // string dir = 6; + if (!this_._internal_dir().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_dir()); + } + // double sigvalue = 4; + if (::absl::bit_cast<::uint64_t>(this_._internal_sigvalue()) != 0) { + total_size += 9; + } + // int32 sigflag = 3; + if (this_._internal_sigflag() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_sigflag()); + } + // int32 vol = 7; + if (this_._internal_vol() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_vol()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } + +void ResMsg::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:market_data.ResMsg) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_other_params()->MergeFrom(from._internal_other_params()); + _this->_internal_mutable_other_msg()->MergeFrom(from._internal_other_msg()); + if (!from._internal_signame().empty()) { + _this->_internal_set_signame(from._internal_signame()); + } + if (!from._internal_instrumentid().empty()) { + _this->_internal_set_instrumentid(from._internal_instrumentid()); + } + if (!from._internal_offset().empty()) { + _this->_internal_set_offset(from._internal_offset()); + } + if (!from._internal_dir().empty()) { + _this->_internal_set_dir(from._internal_dir()); + } + if (::absl::bit_cast<::uint64_t>(from._internal_sigvalue()) != 0) { + _this->_impl_.sigvalue_ = from._impl_.sigvalue_; + } + if (from._internal_sigflag() != 0) { + _this->_impl_.sigflag_ = from._impl_.sigflag_; + } + if (from._internal_vol() != 0) { + _this->_impl_.vol_ = from._impl_.vol_; + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void ResMsg::CopyFrom(const ResMsg& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:market_data.ResMsg) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void ResMsg::InternalSwap(ResMsg* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.other_params_.InternalSwap(&other->_impl_.other_params_); + _impl_.other_msg_.InternalSwap(&other->_impl_.other_msg_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.signame_, &other->_impl_.signame_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.instrumentid_, &other->_impl_.instrumentid_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.offset_, &other->_impl_.offset_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.dir_, &other->_impl_.dir_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.vol_) + + sizeof(ResMsg::_impl_.vol_) + - PROTOBUF_FIELD_OFFSET(ResMsg, _impl_.sigvalue_)>( + reinterpret_cast(&_impl_.sigvalue_), + reinterpret_cast(&other->_impl_.sigvalue_)); +} + +::google::protobuf::Metadata ResMsg::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class MsgReply::_Internal { + public: +}; + +MsgReply::MsgReply(::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:market_data.MsgReply) +} +inline PROTOBUF_NDEBUG_INLINE MsgReply::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::market_data::MsgReply& from_msg) + : message_(arena, from.message_), + _cached_size_{0} {} + +MsgReply::MsgReply( + ::google::protobuf::Arena* arena, + const MsgReply& 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 + MsgReply* 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:market_data.MsgReply) +} +inline PROTOBUF_NDEBUG_INLINE MsgReply::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : message_(arena), + _cached_size_{0} {} + +inline void MsgReply::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +MsgReply::~MsgReply() { + // @@protoc_insertion_point(destructor:market_data.MsgReply) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void MsgReply::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.message_.Destroy(); + _impl_.~Impl_(); +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::MessageLite::ClassDataFull + MsgReply::_class_data_ = { + ::google::protobuf::Message::ClassData{ + &_MsgReply_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &MsgReply::MergeImpl, +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::google::protobuf::Message::GetDeleteImpl(), + ::google::protobuf::Message::GetNewImpl(), + ::google::protobuf::Message::GetClearImpl(), &MsgReply::ByteSizeLong, + &MsgReply::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(MsgReply, _impl_._cached_size_), + false, + }, + &MsgReply::kDescriptorMethods, + &descriptor_table_market_5fdata_2eproto, + nullptr, // tracker +}; +const ::google::protobuf::MessageLite::ClassData* MsgReply::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> MsgReply::_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<::market_data::MsgReply>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // string message = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(MsgReply, _impl_.message_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string message = 1; + {PROTOBUF_FIELD_OFFSET(MsgReply, _impl_.message_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\24\7\0\0\0\0\0\0" + "market_data.MsgReply" + "message" + }}, +}; + +PROTOBUF_NOINLINE void MsgReply::Clear() { +// @@protoc_insertion_point(message_clear_start:market_data.MsgReply) + ::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(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* MsgReply::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const MsgReply& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* MsgReply::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const MsgReply& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:market_data.MsgReply) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string message = 1; + if (!this_._internal_message().empty()) { + const std::string& _s = this_._internal_message(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "market_data.MsgReply.message"); + 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:market_data.MsgReply) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t MsgReply::ByteSizeLong(const MessageLite& base) { + const MsgReply& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t MsgReply::ByteSizeLong() const { + const MsgReply& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:market_data.MsgReply) + ::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 message = 1; + if (!this_._internal_message().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_message()); + } + } + return this_.MaybeComputeUnknownFieldsSize(total_size, + &this_._impl_._cached_size_); + } + +void MsgReply::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:market_data.MsgReply) + 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()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void MsgReply::CopyFrom(const MsgReply& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:market_data.MsgReply) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void MsgReply::InternalSwap(MsgReply* 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); +} + +::google::protobuf::Metadata MsgReply::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// @@protoc_insertion_point(namespace_scope) +} // namespace market_data +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_market_5fdata_2eproto), + ::std::false_type{}); +#include "google/protobuf/port_undef.inc" diff --git a/protoc/market_data.pb.h b/protoc/market_data.pb.h new file mode 100644 index 0000000..39b6015 --- /dev/null +++ b/protoc/market_data.pb.h @@ -0,0 +1,3069 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: market_data.proto +// Protobuf C++ Version: 5.28.1 + +#ifndef GOOGLE_PROTOBUF_INCLUDED_market_5fdata_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_market_5fdata_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/runtime_version.h" +#if PROTOBUF_VERSION != 5028001 +#error "Protobuf C++ gencode is built with an incompatible version of" +#error "Protobuf C++ headers/runtime. See" +#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" +#endif +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/unknown_field_set.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_market_5fdata_2eproto + +namespace google { +namespace protobuf { +namespace internal { +class AnyMetadata; +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_market_5fdata_2eproto { + static const ::uint32_t offsets[]; +}; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_market_5fdata_2eproto; +namespace market_data { +class CThostFtdcDepthMarketDataField; +struct CThostFtdcDepthMarketDataFieldDefaultTypeInternal; +extern CThostFtdcDepthMarketDataFieldDefaultTypeInternal _CThostFtdcDepthMarketDataField_default_instance_; +class MsgReply; +struct MsgReplyDefaultTypeInternal; +extern MsgReplyDefaultTypeInternal _MsgReply_default_instance_; +class ResMsg; +struct ResMsgDefaultTypeInternal; +extern ResMsgDefaultTypeInternal _ResMsg_default_instance_; +} // namespace market_data +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace market_data { + +// =================================================================== + + +// ------------------------------------------------------------------- + +class ResMsg final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:market_data.ResMsg) */ { + public: + inline ResMsg() : ResMsg(nullptr) {} + ~ResMsg() PROTOBUF_FINAL; + template + explicit PROTOBUF_CONSTEXPR ResMsg( + ::google::protobuf::internal::ConstantInitialized); + + inline ResMsg(const ResMsg& from) : ResMsg(nullptr, from) {} + inline ResMsg(ResMsg&& from) noexcept + : ResMsg(nullptr, std::move(from)) {} + inline ResMsg& operator=(const ResMsg& from) { + CopyFrom(from); + return *this; + } + inline ResMsg& operator=(ResMsg&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ResMsg& default_instance() { + return *internal_default_instance(); + } + static inline const ResMsg* internal_default_instance() { + return reinterpret_cast( + &_ResMsg_default_instance_); + } + static constexpr int kIndexInFileMessages = 1; + friend void swap(ResMsg& a, ResMsg& b) { a.Swap(&b); } + inline void Swap(ResMsg* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ResMsg* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ResMsg* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const ResMsg& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const ResMsg& from) { ResMsg::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(ResMsg* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "market_data.ResMsg"; } + + protected: + explicit ResMsg(::google::protobuf::Arena* arena); + ResMsg(::google::protobuf::Arena* arena, const ResMsg& from); + ResMsg(::google::protobuf::Arena* arena, ResMsg&& from) noexcept + : ResMsg(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static const ::google::protobuf::Message::ClassDataFull _class_data_; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kOtherParamsFieldNumber = 8, + kOtherMsgFieldNumber = 9, + kSignameFieldNumber = 1, + kInstrumentIDFieldNumber = 2, + kOffsetFieldNumber = 5, + kDirFieldNumber = 6, + kSigvalueFieldNumber = 4, + kSigflagFieldNumber = 3, + kVolFieldNumber = 7, + }; + // repeated double other_params = 8; + int other_params_size() const; + private: + int _internal_other_params_size() const; + + public: + void clear_other_params() ; + double other_params(int index) const; + void set_other_params(int index, double value); + void add_other_params(double value); + const ::google::protobuf::RepeatedField& other_params() const; + ::google::protobuf::RepeatedField* mutable_other_params(); + + private: + const ::google::protobuf::RepeatedField& _internal_other_params() const; + ::google::protobuf::RepeatedField* _internal_mutable_other_params(); + + public: + // repeated string other_msg = 9; + int other_msg_size() const; + private: + int _internal_other_msg_size() const; + + public: + void clear_other_msg() ; + const std::string& other_msg(int index) const; + std::string* mutable_other_msg(int index); + template + void set_other_msg(int index, Arg_&& value, Args_... args); + std::string* add_other_msg(); + template + void add_other_msg(Arg_&& value, Args_... args); + const ::google::protobuf::RepeatedPtrField& other_msg() const; + ::google::protobuf::RepeatedPtrField* mutable_other_msg(); + + private: + const ::google::protobuf::RepeatedPtrField& _internal_other_msg() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_other_msg(); + + public: + // string signame = 1; + void clear_signame() ; + const std::string& signame() const; + template + void set_signame(Arg_&& arg, Args_... args); + std::string* mutable_signame(); + PROTOBUF_NODISCARD std::string* release_signame(); + void set_allocated_signame(std::string* value); + + private: + const std::string& _internal_signame() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_signame( + const std::string& value); + std::string* _internal_mutable_signame(); + + public: + // string InstrumentID = 2; + void clear_instrumentid() ; + const std::string& instrumentid() const; + template + void set_instrumentid(Arg_&& arg, Args_... args); + std::string* mutable_instrumentid(); + PROTOBUF_NODISCARD std::string* release_instrumentid(); + void set_allocated_instrumentid(std::string* value); + + private: + const std::string& _internal_instrumentid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_instrumentid( + const std::string& value); + std::string* _internal_mutable_instrumentid(); + + public: + // string offset = 5; + void clear_offset() ; + const std::string& offset() const; + template + void set_offset(Arg_&& arg, Args_... args); + std::string* mutable_offset(); + PROTOBUF_NODISCARD std::string* release_offset(); + void set_allocated_offset(std::string* value); + + private: + const std::string& _internal_offset() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_offset( + const std::string& value); + std::string* _internal_mutable_offset(); + + public: + // string dir = 6; + void clear_dir() ; + const std::string& dir() const; + template + void set_dir(Arg_&& arg, Args_... args); + std::string* mutable_dir(); + PROTOBUF_NODISCARD std::string* release_dir(); + void set_allocated_dir(std::string* value); + + private: + const std::string& _internal_dir() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_dir( + const std::string& value); + std::string* _internal_mutable_dir(); + + public: + // double sigvalue = 4; + void clear_sigvalue() ; + double sigvalue() const; + void set_sigvalue(double value); + + private: + double _internal_sigvalue() const; + void _internal_set_sigvalue(double value); + + public: + // int32 sigflag = 3; + void clear_sigflag() ; + ::int32_t sigflag() const; + void set_sigflag(::int32_t value); + + private: + ::int32_t _internal_sigflag() const; + void _internal_set_sigflag(::int32_t value); + + public: + // int32 vol = 7; + void clear_vol() ; + ::int32_t vol() const; + void set_vol(::int32_t value); + + private: + ::int32_t _internal_vol() const; + void _internal_set_vol(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:market_data.ResMsg) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 4, 9, 0, + 72, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_ResMsg_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const ResMsg& from_msg); + ::google::protobuf::RepeatedField other_params_; + ::google::protobuf::RepeatedPtrField other_msg_; + ::google::protobuf::internal::ArenaStringPtr signame_; + ::google::protobuf::internal::ArenaStringPtr instrumentid_; + ::google::protobuf::internal::ArenaStringPtr offset_; + ::google::protobuf::internal::ArenaStringPtr dir_; + double sigvalue_; + ::int32_t sigflag_; + ::int32_t vol_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_market_5fdata_2eproto; +}; +// ------------------------------------------------------------------- + +class MsgReply final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:market_data.MsgReply) */ { + public: + inline MsgReply() : MsgReply(nullptr) {} + ~MsgReply() PROTOBUF_FINAL; + template + explicit PROTOBUF_CONSTEXPR MsgReply( + ::google::protobuf::internal::ConstantInitialized); + + inline MsgReply(const MsgReply& from) : MsgReply(nullptr, from) {} + inline MsgReply(MsgReply&& from) noexcept + : MsgReply(nullptr, std::move(from)) {} + inline MsgReply& operator=(const MsgReply& from) { + CopyFrom(from); + return *this; + } + inline MsgReply& operator=(MsgReply&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const MsgReply& default_instance() { + return *internal_default_instance(); + } + static inline const MsgReply* internal_default_instance() { + return reinterpret_cast( + &_MsgReply_default_instance_); + } + static constexpr int kIndexInFileMessages = 2; + friend void swap(MsgReply& a, MsgReply& b) { a.Swap(&b); } + inline void Swap(MsgReply* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MsgReply* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MsgReply* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const MsgReply& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const MsgReply& from) { MsgReply::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(MsgReply* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "market_data.MsgReply"; } + + protected: + explicit MsgReply(::google::protobuf::Arena* arena); + MsgReply(::google::protobuf::Arena* arena, const MsgReply& from); + MsgReply(::google::protobuf::Arena* arena, MsgReply&& from) noexcept + : MsgReply(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static const ::google::protobuf::Message::ClassDataFull _class_data_; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kMessageFieldNumber = 1, + }; + // string message = 1; + void clear_message() ; + const std::string& message() const; + template + void set_message(Arg_&& arg, Args_... args); + std::string* mutable_message(); + PROTOBUF_NODISCARD std::string* release_message(); + void set_allocated_message(std::string* value); + + private: + const std::string& _internal_message() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_message( + const std::string& value); + std::string* _internal_mutable_message(); + + public: + // @@protoc_insertion_point(class_scope:market_data.MsgReply) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 0, + 36, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_MsgReply_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const MsgReply& from_msg); + ::google::protobuf::internal::ArenaStringPtr message_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_market_5fdata_2eproto; +}; +// ------------------------------------------------------------------- + +class CThostFtdcDepthMarketDataField final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:market_data.CThostFtdcDepthMarketDataField) */ { + public: + inline CThostFtdcDepthMarketDataField() : CThostFtdcDepthMarketDataField(nullptr) {} + ~CThostFtdcDepthMarketDataField() PROTOBUF_FINAL; + template + explicit PROTOBUF_CONSTEXPR CThostFtdcDepthMarketDataField( + ::google::protobuf::internal::ConstantInitialized); + + inline CThostFtdcDepthMarketDataField(const CThostFtdcDepthMarketDataField& from) : CThostFtdcDepthMarketDataField(nullptr, from) {} + inline CThostFtdcDepthMarketDataField(CThostFtdcDepthMarketDataField&& from) noexcept + : CThostFtdcDepthMarketDataField(nullptr, std::move(from)) {} + inline CThostFtdcDepthMarketDataField& operator=(const CThostFtdcDepthMarketDataField& from) { + CopyFrom(from); + return *this; + } + inline CThostFtdcDepthMarketDataField& operator=(CThostFtdcDepthMarketDataField&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CThostFtdcDepthMarketDataField& default_instance() { + return *internal_default_instance(); + } + static inline const CThostFtdcDepthMarketDataField* internal_default_instance() { + return reinterpret_cast( + &_CThostFtdcDepthMarketDataField_default_instance_); + } + static constexpr int kIndexInFileMessages = 0; + friend void swap(CThostFtdcDepthMarketDataField& a, CThostFtdcDepthMarketDataField& b) { a.Swap(&b); } + inline void Swap(CThostFtdcDepthMarketDataField* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CThostFtdcDepthMarketDataField* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CThostFtdcDepthMarketDataField* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const CThostFtdcDepthMarketDataField& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const CThostFtdcDepthMarketDataField& from) { CThostFtdcDepthMarketDataField::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(CThostFtdcDepthMarketDataField* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "market_data.CThostFtdcDepthMarketDataField"; } + + protected: + explicit CThostFtdcDepthMarketDataField(::google::protobuf::Arena* arena); + CThostFtdcDepthMarketDataField(::google::protobuf::Arena* arena, const CThostFtdcDepthMarketDataField& from); + CThostFtdcDepthMarketDataField(::google::protobuf::Arena* arena, CThostFtdcDepthMarketDataField&& from) noexcept + : CThostFtdcDepthMarketDataField(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL; + static const ::google::protobuf::Message::ClassDataFull _class_data_; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kTradingDayFieldNumber = 1, + kReserve1FieldNumber = 2, + kExchangeIDFieldNumber = 3, + kReserve2FieldNumber = 4, + kUpdateTimeFieldNumber = 21, + kActionDayFieldNumber = 44, + kInstrumentIDFieldNumber = 45, + kExchangeInstIDFieldNumber = 46, + kLastPriceFieldNumber = 5, + kPreSettlementPriceFieldNumber = 6, + kPreClosePriceFieldNumber = 7, + kPreOpenInterestFieldNumber = 8, + kOpenPriceFieldNumber = 9, + kHighestPriceFieldNumber = 10, + kLowestPriceFieldNumber = 11, + kTurnoverFieldNumber = 13, + kOpenInterestFieldNumber = 14, + kClosePriceFieldNumber = 15, + kSettlementPriceFieldNumber = 16, + kUpperLimitPriceFieldNumber = 17, + kVolumeFieldNumber = 12, + kUpdateMillisecFieldNumber = 22, + kLowerLimitPriceFieldNumber = 18, + kPreDeltaFieldNumber = 19, + kCurrDeltaFieldNumber = 20, + kBidPrice1FieldNumber = 23, + kAskPrice1FieldNumber = 25, + kBidVolume1FieldNumber = 24, + kAskVolume1FieldNumber = 26, + kBidPrice2FieldNumber = 27, + kAskPrice2FieldNumber = 29, + kBidVolume2FieldNumber = 28, + kAskVolume2FieldNumber = 30, + kBidPrice3FieldNumber = 31, + kAskPrice3FieldNumber = 33, + kBidVolume3FieldNumber = 32, + kAskVolume3FieldNumber = 34, + kBidPrice4FieldNumber = 35, + kAskPrice4FieldNumber = 37, + kBidVolume4FieldNumber = 36, + kAskVolume4FieldNumber = 38, + kBidPrice5FieldNumber = 39, + kAskPrice5FieldNumber = 41, + kBidVolume5FieldNumber = 40, + kAskVolume5FieldNumber = 42, + kAveragePriceFieldNumber = 43, + }; + // string TradingDay = 1; + void clear_tradingday() ; + const std::string& tradingday() const; + template + void set_tradingday(Arg_&& arg, Args_... args); + std::string* mutable_tradingday(); + PROTOBUF_NODISCARD std::string* release_tradingday(); + void set_allocated_tradingday(std::string* value); + + private: + const std::string& _internal_tradingday() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_tradingday( + const std::string& value); + std::string* _internal_mutable_tradingday(); + + public: + // string reserve1 = 2; + void clear_reserve1() ; + const std::string& reserve1() const; + template + void set_reserve1(Arg_&& arg, Args_... args); + std::string* mutable_reserve1(); + PROTOBUF_NODISCARD std::string* release_reserve1(); + void set_allocated_reserve1(std::string* value); + + private: + const std::string& _internal_reserve1() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_reserve1( + const std::string& value); + std::string* _internal_mutable_reserve1(); + + public: + // string ExchangeID = 3; + void clear_exchangeid() ; + const std::string& exchangeid() const; + template + void set_exchangeid(Arg_&& arg, Args_... args); + std::string* mutable_exchangeid(); + PROTOBUF_NODISCARD std::string* release_exchangeid(); + void set_allocated_exchangeid(std::string* value); + + private: + const std::string& _internal_exchangeid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_exchangeid( + const std::string& value); + std::string* _internal_mutable_exchangeid(); + + public: + // string reserve2 = 4; + void clear_reserve2() ; + const std::string& reserve2() const; + template + void set_reserve2(Arg_&& arg, Args_... args); + std::string* mutable_reserve2(); + PROTOBUF_NODISCARD std::string* release_reserve2(); + void set_allocated_reserve2(std::string* value); + + private: + const std::string& _internal_reserve2() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_reserve2( + const std::string& value); + std::string* _internal_mutable_reserve2(); + + public: + // string UpdateTime = 21; + void clear_updatetime() ; + const std::string& updatetime() const; + template + void set_updatetime(Arg_&& arg, Args_... args); + std::string* mutable_updatetime(); + PROTOBUF_NODISCARD std::string* release_updatetime(); + void set_allocated_updatetime(std::string* value); + + private: + const std::string& _internal_updatetime() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_updatetime( + const std::string& value); + std::string* _internal_mutable_updatetime(); + + public: + // string ActionDay = 44; + void clear_actionday() ; + const std::string& actionday() const; + template + void set_actionday(Arg_&& arg, Args_... args); + std::string* mutable_actionday(); + PROTOBUF_NODISCARD std::string* release_actionday(); + void set_allocated_actionday(std::string* value); + + private: + const std::string& _internal_actionday() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_actionday( + const std::string& value); + std::string* _internal_mutable_actionday(); + + public: + // string InstrumentID = 45; + void clear_instrumentid() ; + const std::string& instrumentid() const; + template + void set_instrumentid(Arg_&& arg, Args_... args); + std::string* mutable_instrumentid(); + PROTOBUF_NODISCARD std::string* release_instrumentid(); + void set_allocated_instrumentid(std::string* value); + + private: + const std::string& _internal_instrumentid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_instrumentid( + const std::string& value); + std::string* _internal_mutable_instrumentid(); + + public: + // string ExchangeInstID = 46; + void clear_exchangeinstid() ; + const std::string& exchangeinstid() const; + template + void set_exchangeinstid(Arg_&& arg, Args_... args); + std::string* mutable_exchangeinstid(); + PROTOBUF_NODISCARD std::string* release_exchangeinstid(); + void set_allocated_exchangeinstid(std::string* value); + + private: + const std::string& _internal_exchangeinstid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_exchangeinstid( + const std::string& value); + std::string* _internal_mutable_exchangeinstid(); + + public: + // double LastPrice = 5; + void clear_lastprice() ; + double lastprice() const; + void set_lastprice(double value); + + private: + double _internal_lastprice() const; + void _internal_set_lastprice(double value); + + public: + // double PreSettlementPrice = 6; + void clear_presettlementprice() ; + double presettlementprice() const; + void set_presettlementprice(double value); + + private: + double _internal_presettlementprice() const; + void _internal_set_presettlementprice(double value); + + public: + // double PreClosePrice = 7; + void clear_precloseprice() ; + double precloseprice() const; + void set_precloseprice(double value); + + private: + double _internal_precloseprice() const; + void _internal_set_precloseprice(double value); + + public: + // double PreOpenInterest = 8; + void clear_preopeninterest() ; + double preopeninterest() const; + void set_preopeninterest(double value); + + private: + double _internal_preopeninterest() const; + void _internal_set_preopeninterest(double value); + + public: + // double OpenPrice = 9; + void clear_openprice() ; + double openprice() const; + void set_openprice(double value); + + private: + double _internal_openprice() const; + void _internal_set_openprice(double value); + + public: + // double HighestPrice = 10; + void clear_highestprice() ; + double highestprice() const; + void set_highestprice(double value); + + private: + double _internal_highestprice() const; + void _internal_set_highestprice(double value); + + public: + // double LowestPrice = 11; + void clear_lowestprice() ; + double lowestprice() const; + void set_lowestprice(double value); + + private: + double _internal_lowestprice() const; + void _internal_set_lowestprice(double value); + + public: + // double Turnover = 13; + void clear_turnover() ; + double turnover() const; + void set_turnover(double value); + + private: + double _internal_turnover() const; + void _internal_set_turnover(double value); + + public: + // double OpenInterest = 14; + void clear_openinterest() ; + double openinterest() const; + void set_openinterest(double value); + + private: + double _internal_openinterest() const; + void _internal_set_openinterest(double value); + + public: + // double ClosePrice = 15; + void clear_closeprice() ; + double closeprice() const; + void set_closeprice(double value); + + private: + double _internal_closeprice() const; + void _internal_set_closeprice(double value); + + public: + // double SettlementPrice = 16; + void clear_settlementprice() ; + double settlementprice() const; + void set_settlementprice(double value); + + private: + double _internal_settlementprice() const; + void _internal_set_settlementprice(double value); + + public: + // double UpperLimitPrice = 17; + void clear_upperlimitprice() ; + double upperlimitprice() const; + void set_upperlimitprice(double value); + + private: + double _internal_upperlimitprice() const; + void _internal_set_upperlimitprice(double value); + + public: + // int32 Volume = 12; + void clear_volume() ; + ::int32_t volume() const; + void set_volume(::int32_t value); + + private: + ::int32_t _internal_volume() const; + void _internal_set_volume(::int32_t value); + + public: + // int32 UpdateMillisec = 22; + void clear_updatemillisec() ; + ::int32_t updatemillisec() const; + void set_updatemillisec(::int32_t value); + + private: + ::int32_t _internal_updatemillisec() const; + void _internal_set_updatemillisec(::int32_t value); + + public: + // double LowerLimitPrice = 18; + void clear_lowerlimitprice() ; + double lowerlimitprice() const; + void set_lowerlimitprice(double value); + + private: + double _internal_lowerlimitprice() const; + void _internal_set_lowerlimitprice(double value); + + public: + // double PreDelta = 19; + void clear_predelta() ; + double predelta() const; + void set_predelta(double value); + + private: + double _internal_predelta() const; + void _internal_set_predelta(double value); + + public: + // double CurrDelta = 20; + void clear_currdelta() ; + double currdelta() const; + void set_currdelta(double value); + + private: + double _internal_currdelta() const; + void _internal_set_currdelta(double value); + + public: + // double BidPrice1 = 23; + void clear_bidprice1() ; + double bidprice1() const; + void set_bidprice1(double value); + + private: + double _internal_bidprice1() const; + void _internal_set_bidprice1(double value); + + public: + // double AskPrice1 = 25; + void clear_askprice1() ; + double askprice1() const; + void set_askprice1(double value); + + private: + double _internal_askprice1() const; + void _internal_set_askprice1(double value); + + public: + // int32 BidVolume1 = 24; + void clear_bidvolume1() ; + ::int32_t bidvolume1() const; + void set_bidvolume1(::int32_t value); + + private: + ::int32_t _internal_bidvolume1() const; + void _internal_set_bidvolume1(::int32_t value); + + public: + // int32 AskVolume1 = 26; + void clear_askvolume1() ; + ::int32_t askvolume1() const; + void set_askvolume1(::int32_t value); + + private: + ::int32_t _internal_askvolume1() const; + void _internal_set_askvolume1(::int32_t value); + + public: + // double BidPrice2 = 27; + void clear_bidprice2() ; + double bidprice2() const; + void set_bidprice2(double value); + + private: + double _internal_bidprice2() const; + void _internal_set_bidprice2(double value); + + public: + // double AskPrice2 = 29; + void clear_askprice2() ; + double askprice2() const; + void set_askprice2(double value); + + private: + double _internal_askprice2() const; + void _internal_set_askprice2(double value); + + public: + // int32 BidVolume2 = 28; + void clear_bidvolume2() ; + ::int32_t bidvolume2() const; + void set_bidvolume2(::int32_t value); + + private: + ::int32_t _internal_bidvolume2() const; + void _internal_set_bidvolume2(::int32_t value); + + public: + // int32 AskVolume2 = 30; + void clear_askvolume2() ; + ::int32_t askvolume2() const; + void set_askvolume2(::int32_t value); + + private: + ::int32_t _internal_askvolume2() const; + void _internal_set_askvolume2(::int32_t value); + + public: + // double BidPrice3 = 31; + void clear_bidprice3() ; + double bidprice3() const; + void set_bidprice3(double value); + + private: + double _internal_bidprice3() const; + void _internal_set_bidprice3(double value); + + public: + // double AskPrice3 = 33; + void clear_askprice3() ; + double askprice3() const; + void set_askprice3(double value); + + private: + double _internal_askprice3() const; + void _internal_set_askprice3(double value); + + public: + // int32 BidVolume3 = 32; + void clear_bidvolume3() ; + ::int32_t bidvolume3() const; + void set_bidvolume3(::int32_t value); + + private: + ::int32_t _internal_bidvolume3() const; + void _internal_set_bidvolume3(::int32_t value); + + public: + // int32 AskVolume3 = 34; + void clear_askvolume3() ; + ::int32_t askvolume3() const; + void set_askvolume3(::int32_t value); + + private: + ::int32_t _internal_askvolume3() const; + void _internal_set_askvolume3(::int32_t value); + + public: + // double BidPrice4 = 35; + void clear_bidprice4() ; + double bidprice4() const; + void set_bidprice4(double value); + + private: + double _internal_bidprice4() const; + void _internal_set_bidprice4(double value); + + public: + // double AskPrice4 = 37; + void clear_askprice4() ; + double askprice4() const; + void set_askprice4(double value); + + private: + double _internal_askprice4() const; + void _internal_set_askprice4(double value); + + public: + // int32 BidVolume4 = 36; + void clear_bidvolume4() ; + ::int32_t bidvolume4() const; + void set_bidvolume4(::int32_t value); + + private: + ::int32_t _internal_bidvolume4() const; + void _internal_set_bidvolume4(::int32_t value); + + public: + // int32 AskVolume4 = 38; + void clear_askvolume4() ; + ::int32_t askvolume4() const; + void set_askvolume4(::int32_t value); + + private: + ::int32_t _internal_askvolume4() const; + void _internal_set_askvolume4(::int32_t value); + + public: + // double BidPrice5 = 39; + void clear_bidprice5() ; + double bidprice5() const; + void set_bidprice5(double value); + + private: + double _internal_bidprice5() const; + void _internal_set_bidprice5(double value); + + public: + // double AskPrice5 = 41; + void clear_askprice5() ; + double askprice5() const; + void set_askprice5(double value); + + private: + double _internal_askprice5() const; + void _internal_set_askprice5(double value); + + public: + // int32 BidVolume5 = 40; + void clear_bidvolume5() ; + ::int32_t bidvolume5() const; + void set_bidvolume5(::int32_t value); + + private: + ::int32_t _internal_bidvolume5() const; + void _internal_set_bidvolume5(::int32_t value); + + public: + // int32 AskVolume5 = 42; + void clear_askvolume5() ; + ::int32_t askvolume5() const; + void set_askvolume5(::int32_t value); + + private: + ::int32_t _internal_askvolume5() const; + void _internal_set_askvolume5(::int32_t value); + + public: + // double AveragePrice = 43; + void clear_averageprice() ; + double averageprice() const; + void set_averageprice(double value); + + private: + double _internal_averageprice() const; + void _internal_set_averageprice(double value); + + public: + // @@protoc_insertion_point(class_scope:market_data.CThostFtdcDepthMarketDataField) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 5, 46, 0, + 172, 7> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_CThostFtdcDepthMarketDataField_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const CThostFtdcDepthMarketDataField& from_msg); + ::google::protobuf::internal::ArenaStringPtr tradingday_; + ::google::protobuf::internal::ArenaStringPtr reserve1_; + ::google::protobuf::internal::ArenaStringPtr exchangeid_; + ::google::protobuf::internal::ArenaStringPtr reserve2_; + ::google::protobuf::internal::ArenaStringPtr updatetime_; + ::google::protobuf::internal::ArenaStringPtr actionday_; + ::google::protobuf::internal::ArenaStringPtr instrumentid_; + ::google::protobuf::internal::ArenaStringPtr exchangeinstid_; + double lastprice_; + double presettlementprice_; + double precloseprice_; + double preopeninterest_; + double openprice_; + double highestprice_; + double lowestprice_; + double turnover_; + double openinterest_; + double closeprice_; + double settlementprice_; + double upperlimitprice_; + ::int32_t volume_; + ::int32_t updatemillisec_; + double lowerlimitprice_; + double predelta_; + double currdelta_; + double bidprice1_; + double askprice1_; + ::int32_t bidvolume1_; + ::int32_t askvolume1_; + double bidprice2_; + double askprice2_; + ::int32_t bidvolume2_; + ::int32_t askvolume2_; + double bidprice3_; + double askprice3_; + ::int32_t bidvolume3_; + ::int32_t askvolume3_; + double bidprice4_; + double askprice4_; + ::int32_t bidvolume4_; + ::int32_t askvolume4_; + double bidprice5_; + double askprice5_; + ::int32_t bidvolume5_; + ::int32_t askvolume5_; + double averageprice_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_market_5fdata_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// CThostFtdcDepthMarketDataField + +// string TradingDay = 1; +inline void CThostFtdcDepthMarketDataField::clear_tradingday() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.tradingday_.ClearToEmpty(); +} +inline const std::string& CThostFtdcDepthMarketDataField::tradingday() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.TradingDay) + return _internal_tradingday(); +} +template +inline PROTOBUF_ALWAYS_INLINE void CThostFtdcDepthMarketDataField::set_tradingday(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.tradingday_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.TradingDay) +} +inline std::string* CThostFtdcDepthMarketDataField::mutable_tradingday() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_tradingday(); + // @@protoc_insertion_point(field_mutable:market_data.CThostFtdcDepthMarketDataField.TradingDay) + return _s; +} +inline const std::string& CThostFtdcDepthMarketDataField::_internal_tradingday() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.tradingday_.Get(); +} +inline void CThostFtdcDepthMarketDataField::_internal_set_tradingday(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.tradingday_.Set(value, GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::_internal_mutable_tradingday() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.tradingday_.Mutable( GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::release_tradingday() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:market_data.CThostFtdcDepthMarketDataField.TradingDay) + return _impl_.tradingday_.Release(); +} +inline void CThostFtdcDepthMarketDataField::set_allocated_tradingday(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.tradingday_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.tradingday_.IsDefault()) { + _impl_.tradingday_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:market_data.CThostFtdcDepthMarketDataField.TradingDay) +} + +// string reserve1 = 2; +inline void CThostFtdcDepthMarketDataField::clear_reserve1() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.reserve1_.ClearToEmpty(); +} +inline const std::string& CThostFtdcDepthMarketDataField::reserve1() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.reserve1) + return _internal_reserve1(); +} +template +inline PROTOBUF_ALWAYS_INLINE void CThostFtdcDepthMarketDataField::set_reserve1(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.reserve1_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.reserve1) +} +inline std::string* CThostFtdcDepthMarketDataField::mutable_reserve1() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_reserve1(); + // @@protoc_insertion_point(field_mutable:market_data.CThostFtdcDepthMarketDataField.reserve1) + return _s; +} +inline const std::string& CThostFtdcDepthMarketDataField::_internal_reserve1() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.reserve1_.Get(); +} +inline void CThostFtdcDepthMarketDataField::_internal_set_reserve1(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.reserve1_.Set(value, GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::_internal_mutable_reserve1() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.reserve1_.Mutable( GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::release_reserve1() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:market_data.CThostFtdcDepthMarketDataField.reserve1) + return _impl_.reserve1_.Release(); +} +inline void CThostFtdcDepthMarketDataField::set_allocated_reserve1(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.reserve1_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.reserve1_.IsDefault()) { + _impl_.reserve1_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:market_data.CThostFtdcDepthMarketDataField.reserve1) +} + +// string ExchangeID = 3; +inline void CThostFtdcDepthMarketDataField::clear_exchangeid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.exchangeid_.ClearToEmpty(); +} +inline const std::string& CThostFtdcDepthMarketDataField::exchangeid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.ExchangeID) + return _internal_exchangeid(); +} +template +inline PROTOBUF_ALWAYS_INLINE void CThostFtdcDepthMarketDataField::set_exchangeid(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.exchangeid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.ExchangeID) +} +inline std::string* CThostFtdcDepthMarketDataField::mutable_exchangeid() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_exchangeid(); + // @@protoc_insertion_point(field_mutable:market_data.CThostFtdcDepthMarketDataField.ExchangeID) + return _s; +} +inline const std::string& CThostFtdcDepthMarketDataField::_internal_exchangeid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.exchangeid_.Get(); +} +inline void CThostFtdcDepthMarketDataField::_internal_set_exchangeid(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.exchangeid_.Set(value, GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::_internal_mutable_exchangeid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.exchangeid_.Mutable( GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::release_exchangeid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:market_data.CThostFtdcDepthMarketDataField.ExchangeID) + return _impl_.exchangeid_.Release(); +} +inline void CThostFtdcDepthMarketDataField::set_allocated_exchangeid(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.exchangeid_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.exchangeid_.IsDefault()) { + _impl_.exchangeid_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:market_data.CThostFtdcDepthMarketDataField.ExchangeID) +} + +// string reserve2 = 4; +inline void CThostFtdcDepthMarketDataField::clear_reserve2() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.reserve2_.ClearToEmpty(); +} +inline const std::string& CThostFtdcDepthMarketDataField::reserve2() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.reserve2) + return _internal_reserve2(); +} +template +inline PROTOBUF_ALWAYS_INLINE void CThostFtdcDepthMarketDataField::set_reserve2(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.reserve2_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.reserve2) +} +inline std::string* CThostFtdcDepthMarketDataField::mutable_reserve2() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_reserve2(); + // @@protoc_insertion_point(field_mutable:market_data.CThostFtdcDepthMarketDataField.reserve2) + return _s; +} +inline const std::string& CThostFtdcDepthMarketDataField::_internal_reserve2() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.reserve2_.Get(); +} +inline void CThostFtdcDepthMarketDataField::_internal_set_reserve2(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.reserve2_.Set(value, GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::_internal_mutable_reserve2() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.reserve2_.Mutable( GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::release_reserve2() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:market_data.CThostFtdcDepthMarketDataField.reserve2) + return _impl_.reserve2_.Release(); +} +inline void CThostFtdcDepthMarketDataField::set_allocated_reserve2(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.reserve2_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.reserve2_.IsDefault()) { + _impl_.reserve2_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:market_data.CThostFtdcDepthMarketDataField.reserve2) +} + +// double LastPrice = 5; +inline void CThostFtdcDepthMarketDataField::clear_lastprice() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lastprice_ = 0; +} +inline double CThostFtdcDepthMarketDataField::lastprice() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.LastPrice) + return _internal_lastprice(); +} +inline void CThostFtdcDepthMarketDataField::set_lastprice(double value) { + _internal_set_lastprice(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.LastPrice) +} +inline double CThostFtdcDepthMarketDataField::_internal_lastprice() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.lastprice_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_lastprice(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lastprice_ = value; +} + +// double PreSettlementPrice = 6; +inline void CThostFtdcDepthMarketDataField::clear_presettlementprice() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.presettlementprice_ = 0; +} +inline double CThostFtdcDepthMarketDataField::presettlementprice() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.PreSettlementPrice) + return _internal_presettlementprice(); +} +inline void CThostFtdcDepthMarketDataField::set_presettlementprice(double value) { + _internal_set_presettlementprice(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.PreSettlementPrice) +} +inline double CThostFtdcDepthMarketDataField::_internal_presettlementprice() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.presettlementprice_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_presettlementprice(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.presettlementprice_ = value; +} + +// double PreClosePrice = 7; +inline void CThostFtdcDepthMarketDataField::clear_precloseprice() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.precloseprice_ = 0; +} +inline double CThostFtdcDepthMarketDataField::precloseprice() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.PreClosePrice) + return _internal_precloseprice(); +} +inline void CThostFtdcDepthMarketDataField::set_precloseprice(double value) { + _internal_set_precloseprice(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.PreClosePrice) +} +inline double CThostFtdcDepthMarketDataField::_internal_precloseprice() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.precloseprice_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_precloseprice(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.precloseprice_ = value; +} + +// double PreOpenInterest = 8; +inline void CThostFtdcDepthMarketDataField::clear_preopeninterest() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.preopeninterest_ = 0; +} +inline double CThostFtdcDepthMarketDataField::preopeninterest() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.PreOpenInterest) + return _internal_preopeninterest(); +} +inline void CThostFtdcDepthMarketDataField::set_preopeninterest(double value) { + _internal_set_preopeninterest(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.PreOpenInterest) +} +inline double CThostFtdcDepthMarketDataField::_internal_preopeninterest() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.preopeninterest_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_preopeninterest(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.preopeninterest_ = value; +} + +// double OpenPrice = 9; +inline void CThostFtdcDepthMarketDataField::clear_openprice() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.openprice_ = 0; +} +inline double CThostFtdcDepthMarketDataField::openprice() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.OpenPrice) + return _internal_openprice(); +} +inline void CThostFtdcDepthMarketDataField::set_openprice(double value) { + _internal_set_openprice(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.OpenPrice) +} +inline double CThostFtdcDepthMarketDataField::_internal_openprice() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.openprice_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_openprice(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.openprice_ = value; +} + +// double HighestPrice = 10; +inline void CThostFtdcDepthMarketDataField::clear_highestprice() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.highestprice_ = 0; +} +inline double CThostFtdcDepthMarketDataField::highestprice() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.HighestPrice) + return _internal_highestprice(); +} +inline void CThostFtdcDepthMarketDataField::set_highestprice(double value) { + _internal_set_highestprice(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.HighestPrice) +} +inline double CThostFtdcDepthMarketDataField::_internal_highestprice() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.highestprice_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_highestprice(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.highestprice_ = value; +} + +// double LowestPrice = 11; +inline void CThostFtdcDepthMarketDataField::clear_lowestprice() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lowestprice_ = 0; +} +inline double CThostFtdcDepthMarketDataField::lowestprice() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.LowestPrice) + return _internal_lowestprice(); +} +inline void CThostFtdcDepthMarketDataField::set_lowestprice(double value) { + _internal_set_lowestprice(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.LowestPrice) +} +inline double CThostFtdcDepthMarketDataField::_internal_lowestprice() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.lowestprice_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_lowestprice(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lowestprice_ = value; +} + +// int32 Volume = 12; +inline void CThostFtdcDepthMarketDataField::clear_volume() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.volume_ = 0; +} +inline ::int32_t CThostFtdcDepthMarketDataField::volume() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.Volume) + return _internal_volume(); +} +inline void CThostFtdcDepthMarketDataField::set_volume(::int32_t value) { + _internal_set_volume(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.Volume) +} +inline ::int32_t CThostFtdcDepthMarketDataField::_internal_volume() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.volume_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_volume(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.volume_ = value; +} + +// double Turnover = 13; +inline void CThostFtdcDepthMarketDataField::clear_turnover() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.turnover_ = 0; +} +inline double CThostFtdcDepthMarketDataField::turnover() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.Turnover) + return _internal_turnover(); +} +inline void CThostFtdcDepthMarketDataField::set_turnover(double value) { + _internal_set_turnover(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.Turnover) +} +inline double CThostFtdcDepthMarketDataField::_internal_turnover() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.turnover_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_turnover(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.turnover_ = value; +} + +// double OpenInterest = 14; +inline void CThostFtdcDepthMarketDataField::clear_openinterest() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.openinterest_ = 0; +} +inline double CThostFtdcDepthMarketDataField::openinterest() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.OpenInterest) + return _internal_openinterest(); +} +inline void CThostFtdcDepthMarketDataField::set_openinterest(double value) { + _internal_set_openinterest(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.OpenInterest) +} +inline double CThostFtdcDepthMarketDataField::_internal_openinterest() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.openinterest_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_openinterest(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.openinterest_ = value; +} + +// double ClosePrice = 15; +inline void CThostFtdcDepthMarketDataField::clear_closeprice() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.closeprice_ = 0; +} +inline double CThostFtdcDepthMarketDataField::closeprice() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.ClosePrice) + return _internal_closeprice(); +} +inline void CThostFtdcDepthMarketDataField::set_closeprice(double value) { + _internal_set_closeprice(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.ClosePrice) +} +inline double CThostFtdcDepthMarketDataField::_internal_closeprice() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.closeprice_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_closeprice(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.closeprice_ = value; +} + +// double SettlementPrice = 16; +inline void CThostFtdcDepthMarketDataField::clear_settlementprice() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.settlementprice_ = 0; +} +inline double CThostFtdcDepthMarketDataField::settlementprice() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.SettlementPrice) + return _internal_settlementprice(); +} +inline void CThostFtdcDepthMarketDataField::set_settlementprice(double value) { + _internal_set_settlementprice(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.SettlementPrice) +} +inline double CThostFtdcDepthMarketDataField::_internal_settlementprice() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.settlementprice_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_settlementprice(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.settlementprice_ = value; +} + +// double UpperLimitPrice = 17; +inline void CThostFtdcDepthMarketDataField::clear_upperlimitprice() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.upperlimitprice_ = 0; +} +inline double CThostFtdcDepthMarketDataField::upperlimitprice() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.UpperLimitPrice) + return _internal_upperlimitprice(); +} +inline void CThostFtdcDepthMarketDataField::set_upperlimitprice(double value) { + _internal_set_upperlimitprice(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.UpperLimitPrice) +} +inline double CThostFtdcDepthMarketDataField::_internal_upperlimitprice() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.upperlimitprice_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_upperlimitprice(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.upperlimitprice_ = value; +} + +// double LowerLimitPrice = 18; +inline void CThostFtdcDepthMarketDataField::clear_lowerlimitprice() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lowerlimitprice_ = 0; +} +inline double CThostFtdcDepthMarketDataField::lowerlimitprice() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.LowerLimitPrice) + return _internal_lowerlimitprice(); +} +inline void CThostFtdcDepthMarketDataField::set_lowerlimitprice(double value) { + _internal_set_lowerlimitprice(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.LowerLimitPrice) +} +inline double CThostFtdcDepthMarketDataField::_internal_lowerlimitprice() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.lowerlimitprice_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_lowerlimitprice(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lowerlimitprice_ = value; +} + +// double PreDelta = 19; +inline void CThostFtdcDepthMarketDataField::clear_predelta() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.predelta_ = 0; +} +inline double CThostFtdcDepthMarketDataField::predelta() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.PreDelta) + return _internal_predelta(); +} +inline void CThostFtdcDepthMarketDataField::set_predelta(double value) { + _internal_set_predelta(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.PreDelta) +} +inline double CThostFtdcDepthMarketDataField::_internal_predelta() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.predelta_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_predelta(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.predelta_ = value; +} + +// double CurrDelta = 20; +inline void CThostFtdcDepthMarketDataField::clear_currdelta() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.currdelta_ = 0; +} +inline double CThostFtdcDepthMarketDataField::currdelta() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.CurrDelta) + return _internal_currdelta(); +} +inline void CThostFtdcDepthMarketDataField::set_currdelta(double value) { + _internal_set_currdelta(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.CurrDelta) +} +inline double CThostFtdcDepthMarketDataField::_internal_currdelta() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.currdelta_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_currdelta(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.currdelta_ = value; +} + +// string UpdateTime = 21; +inline void CThostFtdcDepthMarketDataField::clear_updatetime() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.updatetime_.ClearToEmpty(); +} +inline const std::string& CThostFtdcDepthMarketDataField::updatetime() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.UpdateTime) + return _internal_updatetime(); +} +template +inline PROTOBUF_ALWAYS_INLINE void CThostFtdcDepthMarketDataField::set_updatetime(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.updatetime_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.UpdateTime) +} +inline std::string* CThostFtdcDepthMarketDataField::mutable_updatetime() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_updatetime(); + // @@protoc_insertion_point(field_mutable:market_data.CThostFtdcDepthMarketDataField.UpdateTime) + return _s; +} +inline const std::string& CThostFtdcDepthMarketDataField::_internal_updatetime() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.updatetime_.Get(); +} +inline void CThostFtdcDepthMarketDataField::_internal_set_updatetime(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.updatetime_.Set(value, GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::_internal_mutable_updatetime() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.updatetime_.Mutable( GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::release_updatetime() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:market_data.CThostFtdcDepthMarketDataField.UpdateTime) + return _impl_.updatetime_.Release(); +} +inline void CThostFtdcDepthMarketDataField::set_allocated_updatetime(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.updatetime_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.updatetime_.IsDefault()) { + _impl_.updatetime_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:market_data.CThostFtdcDepthMarketDataField.UpdateTime) +} + +// int32 UpdateMillisec = 22; +inline void CThostFtdcDepthMarketDataField::clear_updatemillisec() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.updatemillisec_ = 0; +} +inline ::int32_t CThostFtdcDepthMarketDataField::updatemillisec() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.UpdateMillisec) + return _internal_updatemillisec(); +} +inline void CThostFtdcDepthMarketDataField::set_updatemillisec(::int32_t value) { + _internal_set_updatemillisec(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.UpdateMillisec) +} +inline ::int32_t CThostFtdcDepthMarketDataField::_internal_updatemillisec() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.updatemillisec_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_updatemillisec(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.updatemillisec_ = value; +} + +// double BidPrice1 = 23; +inline void CThostFtdcDepthMarketDataField::clear_bidprice1() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidprice1_ = 0; +} +inline double CThostFtdcDepthMarketDataField::bidprice1() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.BidPrice1) + return _internal_bidprice1(); +} +inline void CThostFtdcDepthMarketDataField::set_bidprice1(double value) { + _internal_set_bidprice1(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.BidPrice1) +} +inline double CThostFtdcDepthMarketDataField::_internal_bidprice1() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.bidprice1_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_bidprice1(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidprice1_ = value; +} + +// int32 BidVolume1 = 24; +inline void CThostFtdcDepthMarketDataField::clear_bidvolume1() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidvolume1_ = 0; +} +inline ::int32_t CThostFtdcDepthMarketDataField::bidvolume1() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.BidVolume1) + return _internal_bidvolume1(); +} +inline void CThostFtdcDepthMarketDataField::set_bidvolume1(::int32_t value) { + _internal_set_bidvolume1(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.BidVolume1) +} +inline ::int32_t CThostFtdcDepthMarketDataField::_internal_bidvolume1() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.bidvolume1_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_bidvolume1(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidvolume1_ = value; +} + +// double AskPrice1 = 25; +inline void CThostFtdcDepthMarketDataField::clear_askprice1() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askprice1_ = 0; +} +inline double CThostFtdcDepthMarketDataField::askprice1() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.AskPrice1) + return _internal_askprice1(); +} +inline void CThostFtdcDepthMarketDataField::set_askprice1(double value) { + _internal_set_askprice1(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.AskPrice1) +} +inline double CThostFtdcDepthMarketDataField::_internal_askprice1() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.askprice1_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_askprice1(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askprice1_ = value; +} + +// int32 AskVolume1 = 26; +inline void CThostFtdcDepthMarketDataField::clear_askvolume1() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askvolume1_ = 0; +} +inline ::int32_t CThostFtdcDepthMarketDataField::askvolume1() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.AskVolume1) + return _internal_askvolume1(); +} +inline void CThostFtdcDepthMarketDataField::set_askvolume1(::int32_t value) { + _internal_set_askvolume1(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.AskVolume1) +} +inline ::int32_t CThostFtdcDepthMarketDataField::_internal_askvolume1() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.askvolume1_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_askvolume1(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askvolume1_ = value; +} + +// double BidPrice2 = 27; +inline void CThostFtdcDepthMarketDataField::clear_bidprice2() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidprice2_ = 0; +} +inline double CThostFtdcDepthMarketDataField::bidprice2() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.BidPrice2) + return _internal_bidprice2(); +} +inline void CThostFtdcDepthMarketDataField::set_bidprice2(double value) { + _internal_set_bidprice2(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.BidPrice2) +} +inline double CThostFtdcDepthMarketDataField::_internal_bidprice2() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.bidprice2_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_bidprice2(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidprice2_ = value; +} + +// int32 BidVolume2 = 28; +inline void CThostFtdcDepthMarketDataField::clear_bidvolume2() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidvolume2_ = 0; +} +inline ::int32_t CThostFtdcDepthMarketDataField::bidvolume2() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.BidVolume2) + return _internal_bidvolume2(); +} +inline void CThostFtdcDepthMarketDataField::set_bidvolume2(::int32_t value) { + _internal_set_bidvolume2(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.BidVolume2) +} +inline ::int32_t CThostFtdcDepthMarketDataField::_internal_bidvolume2() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.bidvolume2_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_bidvolume2(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidvolume2_ = value; +} + +// double AskPrice2 = 29; +inline void CThostFtdcDepthMarketDataField::clear_askprice2() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askprice2_ = 0; +} +inline double CThostFtdcDepthMarketDataField::askprice2() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.AskPrice2) + return _internal_askprice2(); +} +inline void CThostFtdcDepthMarketDataField::set_askprice2(double value) { + _internal_set_askprice2(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.AskPrice2) +} +inline double CThostFtdcDepthMarketDataField::_internal_askprice2() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.askprice2_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_askprice2(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askprice2_ = value; +} + +// int32 AskVolume2 = 30; +inline void CThostFtdcDepthMarketDataField::clear_askvolume2() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askvolume2_ = 0; +} +inline ::int32_t CThostFtdcDepthMarketDataField::askvolume2() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.AskVolume2) + return _internal_askvolume2(); +} +inline void CThostFtdcDepthMarketDataField::set_askvolume2(::int32_t value) { + _internal_set_askvolume2(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.AskVolume2) +} +inline ::int32_t CThostFtdcDepthMarketDataField::_internal_askvolume2() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.askvolume2_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_askvolume2(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askvolume2_ = value; +} + +// double BidPrice3 = 31; +inline void CThostFtdcDepthMarketDataField::clear_bidprice3() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidprice3_ = 0; +} +inline double CThostFtdcDepthMarketDataField::bidprice3() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.BidPrice3) + return _internal_bidprice3(); +} +inline void CThostFtdcDepthMarketDataField::set_bidprice3(double value) { + _internal_set_bidprice3(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.BidPrice3) +} +inline double CThostFtdcDepthMarketDataField::_internal_bidprice3() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.bidprice3_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_bidprice3(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidprice3_ = value; +} + +// int32 BidVolume3 = 32; +inline void CThostFtdcDepthMarketDataField::clear_bidvolume3() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidvolume3_ = 0; +} +inline ::int32_t CThostFtdcDepthMarketDataField::bidvolume3() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.BidVolume3) + return _internal_bidvolume3(); +} +inline void CThostFtdcDepthMarketDataField::set_bidvolume3(::int32_t value) { + _internal_set_bidvolume3(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.BidVolume3) +} +inline ::int32_t CThostFtdcDepthMarketDataField::_internal_bidvolume3() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.bidvolume3_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_bidvolume3(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidvolume3_ = value; +} + +// double AskPrice3 = 33; +inline void CThostFtdcDepthMarketDataField::clear_askprice3() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askprice3_ = 0; +} +inline double CThostFtdcDepthMarketDataField::askprice3() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.AskPrice3) + return _internal_askprice3(); +} +inline void CThostFtdcDepthMarketDataField::set_askprice3(double value) { + _internal_set_askprice3(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.AskPrice3) +} +inline double CThostFtdcDepthMarketDataField::_internal_askprice3() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.askprice3_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_askprice3(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askprice3_ = value; +} + +// int32 AskVolume3 = 34; +inline void CThostFtdcDepthMarketDataField::clear_askvolume3() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askvolume3_ = 0; +} +inline ::int32_t CThostFtdcDepthMarketDataField::askvolume3() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.AskVolume3) + return _internal_askvolume3(); +} +inline void CThostFtdcDepthMarketDataField::set_askvolume3(::int32_t value) { + _internal_set_askvolume3(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.AskVolume3) +} +inline ::int32_t CThostFtdcDepthMarketDataField::_internal_askvolume3() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.askvolume3_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_askvolume3(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askvolume3_ = value; +} + +// double BidPrice4 = 35; +inline void CThostFtdcDepthMarketDataField::clear_bidprice4() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidprice4_ = 0; +} +inline double CThostFtdcDepthMarketDataField::bidprice4() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.BidPrice4) + return _internal_bidprice4(); +} +inline void CThostFtdcDepthMarketDataField::set_bidprice4(double value) { + _internal_set_bidprice4(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.BidPrice4) +} +inline double CThostFtdcDepthMarketDataField::_internal_bidprice4() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.bidprice4_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_bidprice4(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidprice4_ = value; +} + +// int32 BidVolume4 = 36; +inline void CThostFtdcDepthMarketDataField::clear_bidvolume4() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidvolume4_ = 0; +} +inline ::int32_t CThostFtdcDepthMarketDataField::bidvolume4() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.BidVolume4) + return _internal_bidvolume4(); +} +inline void CThostFtdcDepthMarketDataField::set_bidvolume4(::int32_t value) { + _internal_set_bidvolume4(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.BidVolume4) +} +inline ::int32_t CThostFtdcDepthMarketDataField::_internal_bidvolume4() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.bidvolume4_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_bidvolume4(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidvolume4_ = value; +} + +// double AskPrice4 = 37; +inline void CThostFtdcDepthMarketDataField::clear_askprice4() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askprice4_ = 0; +} +inline double CThostFtdcDepthMarketDataField::askprice4() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.AskPrice4) + return _internal_askprice4(); +} +inline void CThostFtdcDepthMarketDataField::set_askprice4(double value) { + _internal_set_askprice4(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.AskPrice4) +} +inline double CThostFtdcDepthMarketDataField::_internal_askprice4() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.askprice4_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_askprice4(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askprice4_ = value; +} + +// int32 AskVolume4 = 38; +inline void CThostFtdcDepthMarketDataField::clear_askvolume4() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askvolume4_ = 0; +} +inline ::int32_t CThostFtdcDepthMarketDataField::askvolume4() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.AskVolume4) + return _internal_askvolume4(); +} +inline void CThostFtdcDepthMarketDataField::set_askvolume4(::int32_t value) { + _internal_set_askvolume4(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.AskVolume4) +} +inline ::int32_t CThostFtdcDepthMarketDataField::_internal_askvolume4() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.askvolume4_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_askvolume4(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askvolume4_ = value; +} + +// double BidPrice5 = 39; +inline void CThostFtdcDepthMarketDataField::clear_bidprice5() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidprice5_ = 0; +} +inline double CThostFtdcDepthMarketDataField::bidprice5() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.BidPrice5) + return _internal_bidprice5(); +} +inline void CThostFtdcDepthMarketDataField::set_bidprice5(double value) { + _internal_set_bidprice5(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.BidPrice5) +} +inline double CThostFtdcDepthMarketDataField::_internal_bidprice5() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.bidprice5_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_bidprice5(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidprice5_ = value; +} + +// int32 BidVolume5 = 40; +inline void CThostFtdcDepthMarketDataField::clear_bidvolume5() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidvolume5_ = 0; +} +inline ::int32_t CThostFtdcDepthMarketDataField::bidvolume5() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.BidVolume5) + return _internal_bidvolume5(); +} +inline void CThostFtdcDepthMarketDataField::set_bidvolume5(::int32_t value) { + _internal_set_bidvolume5(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.BidVolume5) +} +inline ::int32_t CThostFtdcDepthMarketDataField::_internal_bidvolume5() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.bidvolume5_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_bidvolume5(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.bidvolume5_ = value; +} + +// double AskPrice5 = 41; +inline void CThostFtdcDepthMarketDataField::clear_askprice5() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askprice5_ = 0; +} +inline double CThostFtdcDepthMarketDataField::askprice5() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.AskPrice5) + return _internal_askprice5(); +} +inline void CThostFtdcDepthMarketDataField::set_askprice5(double value) { + _internal_set_askprice5(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.AskPrice5) +} +inline double CThostFtdcDepthMarketDataField::_internal_askprice5() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.askprice5_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_askprice5(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askprice5_ = value; +} + +// int32 AskVolume5 = 42; +inline void CThostFtdcDepthMarketDataField::clear_askvolume5() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askvolume5_ = 0; +} +inline ::int32_t CThostFtdcDepthMarketDataField::askvolume5() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.AskVolume5) + return _internal_askvolume5(); +} +inline void CThostFtdcDepthMarketDataField::set_askvolume5(::int32_t value) { + _internal_set_askvolume5(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.AskVolume5) +} +inline ::int32_t CThostFtdcDepthMarketDataField::_internal_askvolume5() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.askvolume5_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_askvolume5(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.askvolume5_ = value; +} + +// double AveragePrice = 43; +inline void CThostFtdcDepthMarketDataField::clear_averageprice() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.averageprice_ = 0; +} +inline double CThostFtdcDepthMarketDataField::averageprice() const { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.AveragePrice) + return _internal_averageprice(); +} +inline void CThostFtdcDepthMarketDataField::set_averageprice(double value) { + _internal_set_averageprice(value); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.AveragePrice) +} +inline double CThostFtdcDepthMarketDataField::_internal_averageprice() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.averageprice_; +} +inline void CThostFtdcDepthMarketDataField::_internal_set_averageprice(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.averageprice_ = value; +} + +// string ActionDay = 44; +inline void CThostFtdcDepthMarketDataField::clear_actionday() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.actionday_.ClearToEmpty(); +} +inline const std::string& CThostFtdcDepthMarketDataField::actionday() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.ActionDay) + return _internal_actionday(); +} +template +inline PROTOBUF_ALWAYS_INLINE void CThostFtdcDepthMarketDataField::set_actionday(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.actionday_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.ActionDay) +} +inline std::string* CThostFtdcDepthMarketDataField::mutable_actionday() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_actionday(); + // @@protoc_insertion_point(field_mutable:market_data.CThostFtdcDepthMarketDataField.ActionDay) + return _s; +} +inline const std::string& CThostFtdcDepthMarketDataField::_internal_actionday() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.actionday_.Get(); +} +inline void CThostFtdcDepthMarketDataField::_internal_set_actionday(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.actionday_.Set(value, GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::_internal_mutable_actionday() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.actionday_.Mutable( GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::release_actionday() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:market_data.CThostFtdcDepthMarketDataField.ActionDay) + return _impl_.actionday_.Release(); +} +inline void CThostFtdcDepthMarketDataField::set_allocated_actionday(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.actionday_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.actionday_.IsDefault()) { + _impl_.actionday_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:market_data.CThostFtdcDepthMarketDataField.ActionDay) +} + +// string InstrumentID = 45; +inline void CThostFtdcDepthMarketDataField::clear_instrumentid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.instrumentid_.ClearToEmpty(); +} +inline const std::string& CThostFtdcDepthMarketDataField::instrumentid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.InstrumentID) + return _internal_instrumentid(); +} +template +inline PROTOBUF_ALWAYS_INLINE void CThostFtdcDepthMarketDataField::set_instrumentid(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.instrumentid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.InstrumentID) +} +inline std::string* CThostFtdcDepthMarketDataField::mutable_instrumentid() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_instrumentid(); + // @@protoc_insertion_point(field_mutable:market_data.CThostFtdcDepthMarketDataField.InstrumentID) + return _s; +} +inline const std::string& CThostFtdcDepthMarketDataField::_internal_instrumentid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.instrumentid_.Get(); +} +inline void CThostFtdcDepthMarketDataField::_internal_set_instrumentid(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.instrumentid_.Set(value, GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::_internal_mutable_instrumentid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.instrumentid_.Mutable( GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::release_instrumentid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:market_data.CThostFtdcDepthMarketDataField.InstrumentID) + return _impl_.instrumentid_.Release(); +} +inline void CThostFtdcDepthMarketDataField::set_allocated_instrumentid(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.instrumentid_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.instrumentid_.IsDefault()) { + _impl_.instrumentid_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:market_data.CThostFtdcDepthMarketDataField.InstrumentID) +} + +// string ExchangeInstID = 46; +inline void CThostFtdcDepthMarketDataField::clear_exchangeinstid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.exchangeinstid_.ClearToEmpty(); +} +inline const std::string& CThostFtdcDepthMarketDataField::exchangeinstid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:market_data.CThostFtdcDepthMarketDataField.ExchangeInstID) + return _internal_exchangeinstid(); +} +template +inline PROTOBUF_ALWAYS_INLINE void CThostFtdcDepthMarketDataField::set_exchangeinstid(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.exchangeinstid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:market_data.CThostFtdcDepthMarketDataField.ExchangeInstID) +} +inline std::string* CThostFtdcDepthMarketDataField::mutable_exchangeinstid() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_exchangeinstid(); + // @@protoc_insertion_point(field_mutable:market_data.CThostFtdcDepthMarketDataField.ExchangeInstID) + return _s; +} +inline const std::string& CThostFtdcDepthMarketDataField::_internal_exchangeinstid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.exchangeinstid_.Get(); +} +inline void CThostFtdcDepthMarketDataField::_internal_set_exchangeinstid(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.exchangeinstid_.Set(value, GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::_internal_mutable_exchangeinstid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.exchangeinstid_.Mutable( GetArena()); +} +inline std::string* CThostFtdcDepthMarketDataField::release_exchangeinstid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:market_data.CThostFtdcDepthMarketDataField.ExchangeInstID) + return _impl_.exchangeinstid_.Release(); +} +inline void CThostFtdcDepthMarketDataField::set_allocated_exchangeinstid(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.exchangeinstid_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.exchangeinstid_.IsDefault()) { + _impl_.exchangeinstid_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:market_data.CThostFtdcDepthMarketDataField.ExchangeInstID) +} + +// ------------------------------------------------------------------- + +// ResMsg + +// string signame = 1; +inline void ResMsg::clear_signame() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.signame_.ClearToEmpty(); +} +inline const std::string& ResMsg::signame() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:market_data.ResMsg.signame) + return _internal_signame(); +} +template +inline PROTOBUF_ALWAYS_INLINE void ResMsg::set_signame(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.signame_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:market_data.ResMsg.signame) +} +inline std::string* ResMsg::mutable_signame() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_signame(); + // @@protoc_insertion_point(field_mutable:market_data.ResMsg.signame) + return _s; +} +inline const std::string& ResMsg::_internal_signame() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.signame_.Get(); +} +inline void ResMsg::_internal_set_signame(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.signame_.Set(value, GetArena()); +} +inline std::string* ResMsg::_internal_mutable_signame() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.signame_.Mutable( GetArena()); +} +inline std::string* ResMsg::release_signame() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:market_data.ResMsg.signame) + return _impl_.signame_.Release(); +} +inline void ResMsg::set_allocated_signame(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.signame_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.signame_.IsDefault()) { + _impl_.signame_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:market_data.ResMsg.signame) +} + +// string InstrumentID = 2; +inline void ResMsg::clear_instrumentid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.instrumentid_.ClearToEmpty(); +} +inline const std::string& ResMsg::instrumentid() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:market_data.ResMsg.InstrumentID) + return _internal_instrumentid(); +} +template +inline PROTOBUF_ALWAYS_INLINE void ResMsg::set_instrumentid(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.instrumentid_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:market_data.ResMsg.InstrumentID) +} +inline std::string* ResMsg::mutable_instrumentid() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_instrumentid(); + // @@protoc_insertion_point(field_mutable:market_data.ResMsg.InstrumentID) + return _s; +} +inline const std::string& ResMsg::_internal_instrumentid() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.instrumentid_.Get(); +} +inline void ResMsg::_internal_set_instrumentid(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.instrumentid_.Set(value, GetArena()); +} +inline std::string* ResMsg::_internal_mutable_instrumentid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.instrumentid_.Mutable( GetArena()); +} +inline std::string* ResMsg::release_instrumentid() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:market_data.ResMsg.InstrumentID) + return _impl_.instrumentid_.Release(); +} +inline void ResMsg::set_allocated_instrumentid(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.instrumentid_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.instrumentid_.IsDefault()) { + _impl_.instrumentid_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:market_data.ResMsg.InstrumentID) +} + +// int32 sigflag = 3; +inline void ResMsg::clear_sigflag() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.sigflag_ = 0; +} +inline ::int32_t ResMsg::sigflag() const { + // @@protoc_insertion_point(field_get:market_data.ResMsg.sigflag) + return _internal_sigflag(); +} +inline void ResMsg::set_sigflag(::int32_t value) { + _internal_set_sigflag(value); + // @@protoc_insertion_point(field_set:market_data.ResMsg.sigflag) +} +inline ::int32_t ResMsg::_internal_sigflag() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.sigflag_; +} +inline void ResMsg::_internal_set_sigflag(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.sigflag_ = value; +} + +// double sigvalue = 4; +inline void ResMsg::clear_sigvalue() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.sigvalue_ = 0; +} +inline double ResMsg::sigvalue() const { + // @@protoc_insertion_point(field_get:market_data.ResMsg.sigvalue) + return _internal_sigvalue(); +} +inline void ResMsg::set_sigvalue(double value) { + _internal_set_sigvalue(value); + // @@protoc_insertion_point(field_set:market_data.ResMsg.sigvalue) +} +inline double ResMsg::_internal_sigvalue() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.sigvalue_; +} +inline void ResMsg::_internal_set_sigvalue(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.sigvalue_ = value; +} + +// string offset = 5; +inline void ResMsg::clear_offset() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.offset_.ClearToEmpty(); +} +inline const std::string& ResMsg::offset() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:market_data.ResMsg.offset) + return _internal_offset(); +} +template +inline PROTOBUF_ALWAYS_INLINE void ResMsg::set_offset(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.offset_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:market_data.ResMsg.offset) +} +inline std::string* ResMsg::mutable_offset() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_offset(); + // @@protoc_insertion_point(field_mutable:market_data.ResMsg.offset) + return _s; +} +inline const std::string& ResMsg::_internal_offset() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.offset_.Get(); +} +inline void ResMsg::_internal_set_offset(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.offset_.Set(value, GetArena()); +} +inline std::string* ResMsg::_internal_mutable_offset() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.offset_.Mutable( GetArena()); +} +inline std::string* ResMsg::release_offset() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:market_data.ResMsg.offset) + return _impl_.offset_.Release(); +} +inline void ResMsg::set_allocated_offset(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.offset_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.offset_.IsDefault()) { + _impl_.offset_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:market_data.ResMsg.offset) +} + +// string dir = 6; +inline void ResMsg::clear_dir() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.dir_.ClearToEmpty(); +} +inline const std::string& ResMsg::dir() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:market_data.ResMsg.dir) + return _internal_dir(); +} +template +inline PROTOBUF_ALWAYS_INLINE void ResMsg::set_dir(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.dir_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:market_data.ResMsg.dir) +} +inline std::string* ResMsg::mutable_dir() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_dir(); + // @@protoc_insertion_point(field_mutable:market_data.ResMsg.dir) + return _s; +} +inline const std::string& ResMsg::_internal_dir() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.dir_.Get(); +} +inline void ResMsg::_internal_set_dir(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.dir_.Set(value, GetArena()); +} +inline std::string* ResMsg::_internal_mutable_dir() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.dir_.Mutable( GetArena()); +} +inline std::string* ResMsg::release_dir() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:market_data.ResMsg.dir) + return _impl_.dir_.Release(); +} +inline void ResMsg::set_allocated_dir(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.dir_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.dir_.IsDefault()) { + _impl_.dir_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:market_data.ResMsg.dir) +} + +// int32 vol = 7; +inline void ResMsg::clear_vol() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.vol_ = 0; +} +inline ::int32_t ResMsg::vol() const { + // @@protoc_insertion_point(field_get:market_data.ResMsg.vol) + return _internal_vol(); +} +inline void ResMsg::set_vol(::int32_t value) { + _internal_set_vol(value); + // @@protoc_insertion_point(field_set:market_data.ResMsg.vol) +} +inline ::int32_t ResMsg::_internal_vol() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.vol_; +} +inline void ResMsg::_internal_set_vol(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.vol_ = value; +} + +// repeated double other_params = 8; +inline int ResMsg::_internal_other_params_size() const { + return _internal_other_params().size(); +} +inline int ResMsg::other_params_size() const { + return _internal_other_params_size(); +} +inline void ResMsg::clear_other_params() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.other_params_.Clear(); +} +inline double ResMsg::other_params(int index) const { + // @@protoc_insertion_point(field_get:market_data.ResMsg.other_params) + return _internal_other_params().Get(index); +} +inline void ResMsg::set_other_params(int index, double value) { + _internal_mutable_other_params()->Set(index, value); + // @@protoc_insertion_point(field_set:market_data.ResMsg.other_params) +} +inline void ResMsg::add_other_params(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_other_params()->Add(value); + // @@protoc_insertion_point(field_add:market_data.ResMsg.other_params) +} +inline const ::google::protobuf::RepeatedField& ResMsg::other_params() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:market_data.ResMsg.other_params) + return _internal_other_params(); +} +inline ::google::protobuf::RepeatedField* ResMsg::mutable_other_params() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:market_data.ResMsg.other_params) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_other_params(); +} +inline const ::google::protobuf::RepeatedField& +ResMsg::_internal_other_params() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.other_params_; +} +inline ::google::protobuf::RepeatedField* ResMsg::_internal_mutable_other_params() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.other_params_; +} + +// repeated string other_msg = 9; +inline int ResMsg::_internal_other_msg_size() const { + return _internal_other_msg().size(); +} +inline int ResMsg::other_msg_size() const { + return _internal_other_msg_size(); +} +inline void ResMsg::clear_other_msg() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.other_msg_.Clear(); +} +inline std::string* ResMsg::add_other_msg() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + std::string* _s = _internal_mutable_other_msg()->Add(); + // @@protoc_insertion_point(field_add_mutable:market_data.ResMsg.other_msg) + return _s; +} +inline const std::string& ResMsg::other_msg(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:market_data.ResMsg.other_msg) + return _internal_other_msg().Get(index); +} +inline std::string* ResMsg::mutable_other_msg(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:market_data.ResMsg.other_msg) + return _internal_mutable_other_msg()->Mutable(index); +} +template +inline void ResMsg::set_other_msg(int index, Arg_&& value, Args_... args) { + ::google::protobuf::internal::AssignToString( + *_internal_mutable_other_msg()->Mutable(index), + std::forward(value), args... ); + // @@protoc_insertion_point(field_set:market_data.ResMsg.other_msg) +} +template +inline void ResMsg::add_other_msg(Arg_&& value, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::google::protobuf::internal::AddToRepeatedPtrField(*_internal_mutable_other_msg(), + std::forward(value), + args... ); + // @@protoc_insertion_point(field_add:market_data.ResMsg.other_msg) +} +inline const ::google::protobuf::RepeatedPtrField& +ResMsg::other_msg() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:market_data.ResMsg.other_msg) + return _internal_other_msg(); +} +inline ::google::protobuf::RepeatedPtrField* +ResMsg::mutable_other_msg() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:market_data.ResMsg.other_msg) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_other_msg(); +} +inline const ::google::protobuf::RepeatedPtrField& +ResMsg::_internal_other_msg() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.other_msg_; +} +inline ::google::protobuf::RepeatedPtrField* +ResMsg::_internal_mutable_other_msg() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.other_msg_; +} + +// ------------------------------------------------------------------- + +// MsgReply + +// string message = 1; +inline void MsgReply::clear_message() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.message_.ClearToEmpty(); +} +inline const std::string& MsgReply::message() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:market_data.MsgReply.message) + return _internal_message(); +} +template +inline PROTOBUF_ALWAYS_INLINE void MsgReply::set_message(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.message_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:market_data.MsgReply.message) +} +inline std::string* MsgReply::mutable_message() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_message(); + // @@protoc_insertion_point(field_mutable:market_data.MsgReply.message) + return _s; +} +inline const std::string& MsgReply::_internal_message() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.message_.Get(); +} +inline void MsgReply::_internal_set_message(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.message_.Set(value, GetArena()); +} +inline std::string* MsgReply::_internal_mutable_message() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.message_.Mutable( GetArena()); +} +inline std::string* MsgReply::release_message() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:market_data.MsgReply.message) + return _impl_.message_.Release(); +} +inline void MsgReply::set_allocated_message(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.message_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.message_.IsDefault()) { + _impl_.message_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:market_data.MsgReply.message) +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace market_data + + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_market_5fdata_2eproto_2epb_2eh diff --git a/protoc_generate.sh b/protoc_generate.sh new file mode 100644 index 0000000..195631d --- /dev/null +++ b/protoc_generate.sh @@ -0,0 +1,8 @@ +mkdir -p gen_code + +generate_code(){ + protoc -I ./ --grpc_out=./protoc --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` $1 + protoc -I ./ --cpp_out=./protoc $1 +} + +generate_code $@ diff --git a/src/grpc_client_main.cc b/src/grpc_client_main.cc new file mode 100644 index 0000000..969ac5f --- /dev/null +++ b/src/grpc_client_main.cc @@ -0,0 +1,90 @@ +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "common.h" +#include "market_data.pb.h" +#include "protoc.h" + +class MyClient { + public: + // create stub + MyClient(std::shared_ptr channel) + : stub_(market_data::TestService::NewStub(channel)) {} + void GetReplyMsg1() { + market_data::CThostFtdcDepthMarketDataField data; + market_data::MsgReply msg_reply; + data.set_turnover(10); + GetOneData1(data, &msg_reply); + } + void GetReplyMsg2() { + market_data::ResMsg data; + market_data::MsgReply msg_reply; + data.add_other_msg("123"); + GetOneData2(data, &msg_reply); + } + + private: + bool GetOneData1(const market_data::CThostFtdcDepthMarketDataField &data, + market_data::MsgReply *msg_reply) { + grpc::ClientContext context; + // auto start_time = GetTimeUs(); + Status status = stub_->GetData1(&context, data, msg_reply); + // auto end_time = GetTimeUs(); + // std::cout << "time diff:" << end_time - start_time << "us" << std::endl; + if (!status.ok()) { + std::cout << "GetData rpc failed." << std::endl; + return false; + } + if (msg_reply->message().empty()) { + std::cout << "message empty." << std::endl; + return false; + } else { + std::cout << "MsgReply:" << msg_reply->message() << std::endl; + } + return true; + } + bool GetOneData2(const market_data::ResMsg &data, + market_data::MsgReply *msg_reply) { + grpc::ClientContext context; + // auto start_time = GetTimeUs(); + Status status = stub_->GetData2(&context, data, msg_reply); + // auto end_time = GetTimeUs(); + // std::cout << "time diff:" << end_time - start_time << "us" << std::endl; + if (!status.ok()) { + std::cout << "GetData rpc failed." << std::endl; + return false; + } + if (msg_reply->message().empty()) { + std::cout << "message empty." << std::endl; + return false; + } else { + std::cout << "MsgReply:" << msg_reply->message() << std::endl; + } + return true; + } + std::unique_ptr stub_; +}; + +int main(int argc, char **argv) { + // create a gRPC channel for our stub + // grpc::CreateChannel("locakhost:50051",grpc::InsecureChannelCredentials()); + + MyClient client(grpc::CreateChannel("localhost:1234", + grpc::InsecureChannelCredentials())); + std::cout << "=====================" << std::endl; + while (true) { + gxt::SleepMs(500); + client.GetReplyMsg1(); + gxt::SleepMs(500); + client.GetReplyMsg2(); + } + + return 0; +} diff --git a/src/grpc_server_main.cc b/src/grpc_server_main.cc new file mode 100644 index 0000000..5654d5e --- /dev/null +++ b/src/grpc_server_main.cc @@ -0,0 +1,65 @@ +#include +#include +#include +#include +#include +#include + +#include "common.h" +#include "protoc.h" + +using market_data::CThostFtdcDepthMarketDataField; + +class MyServer final : public market_data::TestService::Service { + public: + Status GetData1(ServerContext *context, + const CThostFtdcDepthMarketDataField *data, + market_data::MsgReply *msg) override { + // cout << "[get data]: " << data->data() << endl; + // string tmp("data received 12345"); + // msg->set_message(data->data()); + msg->set_message("getdata1"); // 原路返回 + // gDebug(data->data().size()); + return Status::OK; + } + Status GetData2(ServerContext *context, const market_data::ResMsg *data, + market_data::MsgReply *msg) override { + // cout << "[get data]: " << data->data() << endl; + // string tmp("data received 12345"); + // msg->set_message(data->data()); + msg->set_message("getdata2"); // 原路返回 + // gDebug(data->data().size()); + return Status::OK; + } +}; + +void RunServer() { + std::string server_addr("0.0.0.0:1234"); + // std::string server_addr("127.0.0.1:1235"); + // create an instance of our service implementation class Test1Impl + MyServer service; + + // Create an instance of factory ServerBuilder class + ServerBuilder builder; + + // Specify the address and port we want to use to listen for client requests + // using the builder’s AddListeningPort() method. + builder.AddListeningPort(server_addr, grpc::InsecureServerCredentials()); + + // Register our service implementation with the builder. + builder.RegisterService(&service); + + // Call BuildAndStart() on the builder to create and start an RPC server for + // our service. + std::unique_ptr server(builder.BuildAndStart()); + std::cout << "Server listening on " << server_addr << std::endl; + + // Call Wait() on the server to do a blocking wait until process is killed or + // Shutdown() is called + server->Wait(); +} + +int main(int argc, char **argv) { + RunServer(); + return 0; +}