Files
QTradeProgram/include/Proto/Trd_PlaceOrder.pb.cc
2025-08-15 15:57:31 +08:00

2279 lines
78 KiB
C++

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Trd_PlaceOrder.proto
#include "Trd_PlaceOrder.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.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>
// This is a temporary google only hack
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)
namespace Trd_PlaceOrder {
class C2SDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<C2S>
_instance;
} _C2S_default_instance_;
class S2CDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<S2C>
_instance;
} _S2C_default_instance_;
class RequestDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Request>
_instance;
} _Request_default_instance_;
class ResponseDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<Response>
_instance;
} _Response_default_instance_;
} // namespace Trd_PlaceOrder
namespace protobuf_Trd_5fPlaceOrder_2eproto {
void InitDefaultsC2SImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_Common_2eproto::InitDefaultsPacketID();
protobuf_Trd_5fCommon_2eproto::InitDefaultsTrdHeader();
{
void* ptr = &::Trd_PlaceOrder::_C2S_default_instance_;
new (ptr) ::Trd_PlaceOrder::C2S();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::Trd_PlaceOrder::C2S::InitAsDefaultInstance();
}
void InitDefaultsC2S() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsC2SImpl);
}
void InitDefaultsS2CImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_Trd_5fCommon_2eproto::InitDefaultsTrdHeader();
{
void* ptr = &::Trd_PlaceOrder::_S2C_default_instance_;
new (ptr) ::Trd_PlaceOrder::S2C();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::Trd_PlaceOrder::S2C::InitAsDefaultInstance();
}
void InitDefaultsS2C() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsS2CImpl);
}
void InitDefaultsRequestImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_Trd_5fPlaceOrder_2eproto::InitDefaultsC2S();
{
void* ptr = &::Trd_PlaceOrder::_Request_default_instance_;
new (ptr) ::Trd_PlaceOrder::Request();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::Trd_PlaceOrder::Request::InitAsDefaultInstance();
}
void InitDefaultsRequest() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsRequestImpl);
}
void InitDefaultsResponseImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_Trd_5fPlaceOrder_2eproto::InitDefaultsS2C();
{
void* ptr = &::Trd_PlaceOrder::_Response_default_instance_;
new (ptr) ::Trd_PlaceOrder::Response();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::Trd_PlaceOrder::Response::InitAsDefaultInstance();
}
void InitDefaultsResponse() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsResponseImpl);
}
::google::protobuf::Metadata file_level_metadata[4];
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, packetid_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, header_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, trdside_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, ordertype_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, code_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, qty_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, price_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, adjustprice_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, adjustsideandlimit_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, secmarket_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, remark_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, timeinforce_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, filloutsiderth_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, auxprice_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, trailtype_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, trailvalue_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::C2S, trailspread_),
2,
3,
4,
5,
0,
6,
7,
10,
8,
9,
1,
12,
11,
14,
13,
15,
16,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::S2C, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::S2C, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::S2C, header_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::S2C, orderid_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::S2C, orderidex_),
1,
2,
0,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::Request, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::Request, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::Request, c2s_),
0,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::Response, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::Response, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::Response, rettype_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::Response, retmsg_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::Response, errcode_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Trd_PlaceOrder::Response, s2c_),
3,
0,
2,
1,
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{ 0, 22, sizeof(::Trd_PlaceOrder::C2S)},
{ 39, 47, sizeof(::Trd_PlaceOrder::S2C)},
{ 50, 56, sizeof(::Trd_PlaceOrder::Request)},
{ 57, 66, sizeof(::Trd_PlaceOrder::Response)},
};
static ::google::protobuf::Message const * const file_default_instances[] = {
reinterpret_cast<const ::google::protobuf::Message*>(&::Trd_PlaceOrder::_C2S_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::Trd_PlaceOrder::_S2C_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::Trd_PlaceOrder::_Request_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::Trd_PlaceOrder::_Response_default_instance_),
};
void protobuf_AssignDescriptors() {
AddDescriptors();
::google::protobuf::MessageFactory* factory = NULL;
AssignDescriptors(
"Trd_PlaceOrder.proto", schemas, file_default_instances, TableStruct::offsets, factory,
file_level_metadata, NULL, NULL);
}
void protobuf_AssignDescriptorsOnce() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
}
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 4);
}
void AddDescriptorsImpl() {
InitDefaults();
static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
"\n\024Trd_PlaceOrder.proto\022\016Trd_PlaceOrder\032\014"
"Common.proto\032\020Trd_Common.proto\"\355\002\n\003C2S\022\""
"\n\010packetID\030\001 \002(\0132\020.Common.PacketID\022%\n\006he"
"ader\030\002 \002(\0132\025.Trd_Common.TrdHeader\022\017\n\007trd"
"Side\030\003 \002(\005\022\021\n\torderType\030\004 \002(\005\022\014\n\004code\030\005 "
"\002(\t\022\013\n\003qty\030\006 \002(\001\022\r\n\005price\030\007 \001(\001\022\023\n\013adjus"
"tPrice\030\010 \001(\010\022\032\n\022adjustSideAndLimit\030\t \001(\001"
"\022\021\n\tsecMarket\030\n \001(\005\022\016\n\006remark\030\013 \001(\t\022\023\n\013t"
"imeInForce\030\014 \001(\005\022\026\n\016fillOutsideRTH\030\r \001(\010"
"\022\020\n\010auxPrice\030\016 \001(\001\022\021\n\ttrailType\030\017 \001(\005\022\022\n"
"\ntrailValue\030\020 \001(\001\022\023\n\013trailSpread\030\021 \001(\001\"P"
"\n\003S2C\022%\n\006header\030\001 \002(\0132\025.Trd_Common.TrdHe"
"ader\022\017\n\007orderID\030\002 \001(\004\022\021\n\torderIDEx\030\003 \001(\t"
"\"+\n\007Request\022 \n\003c2s\030\001 \002(\0132\023.Trd_PlaceOrde"
"r.C2S\"d\n\010Response\022\025\n\007retType\030\001 \002(\005:\004-400"
"\022\016\n\006retMsg\030\002 \001(\t\022\017\n\007errCode\030\003 \001(\005\022 \n\003s2c"
"\030\004 \001(\0132\023.Trd_PlaceOrder.S2CBD\n\023com.futu."
"openapi.pbZ-github.com/futuopen/ftapi4go"
"/pb/trdplaceorder"
};
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
descriptor, 737);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"Trd_PlaceOrder.proto", &protobuf_RegisterTypes);
::protobuf_Common_2eproto::AddDescriptors();
::protobuf_Trd_5fCommon_2eproto::AddDescriptors();
}
void AddDescriptors() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
StaticDescriptorInitializer() {
AddDescriptors();
}
} static_descriptor_initializer;
} // namespace protobuf_Trd_5fPlaceOrder_2eproto
namespace Trd_PlaceOrder {
// ===================================================================
void C2S::InitAsDefaultInstance() {
::Trd_PlaceOrder::_C2S_default_instance_._instance.get_mutable()->packetid_ = const_cast< ::Common::PacketID*>(
::Common::PacketID::internal_default_instance());
::Trd_PlaceOrder::_C2S_default_instance_._instance.get_mutable()->header_ = const_cast< ::Trd_Common::TrdHeader*>(
::Trd_Common::TrdHeader::internal_default_instance());
}
void C2S::clear_packetid() {
if (packetid_ != NULL) packetid_->Clear();
clear_has_packetid();
}
void C2S::clear_header() {
if (header_ != NULL) header_->Clear();
clear_has_header();
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int C2S::kPacketIDFieldNumber;
const int C2S::kHeaderFieldNumber;
const int C2S::kTrdSideFieldNumber;
const int C2S::kOrderTypeFieldNumber;
const int C2S::kCodeFieldNumber;
const int C2S::kQtyFieldNumber;
const int C2S::kPriceFieldNumber;
const int C2S::kAdjustPriceFieldNumber;
const int C2S::kAdjustSideAndLimitFieldNumber;
const int C2S::kSecMarketFieldNumber;
const int C2S::kRemarkFieldNumber;
const int C2S::kTimeInForceFieldNumber;
const int C2S::kFillOutsideRTHFieldNumber;
const int C2S::kAuxPriceFieldNumber;
const int C2S::kTrailTypeFieldNumber;
const int C2S::kTrailValueFieldNumber;
const int C2S::kTrailSpreadFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
C2S::C2S()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_Trd_5fPlaceOrder_2eproto::InitDefaultsC2S();
}
SharedCtor();
// @@protoc_insertion_point(constructor:Trd_PlaceOrder.C2S)
}
C2S::C2S(const C2S& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
code_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_code()) {
code_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.code_);
}
remark_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_remark()) {
remark_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.remark_);
}
if (from.has_packetid()) {
packetid_ = new ::Common::PacketID(*from.packetid_);
} else {
packetid_ = NULL;
}
if (from.has_header()) {
header_ = new ::Trd_Common::TrdHeader(*from.header_);
} else {
header_ = NULL;
}
::memcpy(&trdside_, &from.trdside_,
static_cast<size_t>(reinterpret_cast<char*>(&trailspread_) -
reinterpret_cast<char*>(&trdside_)) + sizeof(trailspread_));
// @@protoc_insertion_point(copy_constructor:Trd_PlaceOrder.C2S)
}
void C2S::SharedCtor() {
_cached_size_ = 0;
code_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
remark_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&packetid_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&trailspread_) -
reinterpret_cast<char*>(&packetid_)) + sizeof(trailspread_));
}
C2S::~C2S() {
// @@protoc_insertion_point(destructor:Trd_PlaceOrder.C2S)
SharedDtor();
}
void C2S::SharedDtor() {
code_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
remark_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete packetid_;
if (this != internal_default_instance()) delete header_;
}
void C2S::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* C2S::descriptor() {
::protobuf_Trd_5fPlaceOrder_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fPlaceOrder_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const C2S& C2S::default_instance() {
::protobuf_Trd_5fPlaceOrder_2eproto::InitDefaultsC2S();
return *internal_default_instance();
}
C2S* C2S::New(::google::protobuf::Arena* arena) const {
C2S* n = new C2S;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void C2S::Clear() {
// @@protoc_insertion_point(message_clear_start:Trd_PlaceOrder.C2S)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 15u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!code_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*code_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(!remark_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*remark_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000004u) {
GOOGLE_DCHECK(packetid_ != NULL);
packetid_->Clear();
}
if (cached_has_bits & 0x00000008u) {
GOOGLE_DCHECK(header_ != NULL);
header_->Clear();
}
}
if (cached_has_bits & 240u) {
::memset(&trdside_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&price_) -
reinterpret_cast<char*>(&trdside_)) + sizeof(price_));
}
if (cached_has_bits & 65280u) {
::memset(&adjustsideandlimit_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&trailvalue_) -
reinterpret_cast<char*>(&adjustsideandlimit_)) + sizeof(trailvalue_));
}
trailspread_ = 0;
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool C2S::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:Trd_PlaceOrder.C2S)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .Common.PacketID packetID = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_packetid()));
} else {
goto handle_unusual;
}
break;
}
// required .Trd_Common.TrdHeader header = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_header()));
} else {
goto handle_unusual;
}
break;
}
// required int32 trdSide = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
set_has_trdside();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &trdside_)));
} else {
goto handle_unusual;
}
break;
}
// required int32 orderType = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
set_has_ordertype();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &ordertype_)));
} else {
goto handle_unusual;
}
break;
}
// required string code = 5;
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_code()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->code().data(), static_cast<int>(this->code().length()),
::google::protobuf::internal::WireFormat::PARSE,
"Trd_PlaceOrder.C2S.code");
} else {
goto handle_unusual;
}
break;
}
// required double qty = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(49u /* 49 & 0xFF */)) {
set_has_qty();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &qty_)));
} else {
goto handle_unusual;
}
break;
}
// optional double price = 7;
case 7: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(57u /* 57 & 0xFF */)) {
set_has_price();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &price_)));
} else {
goto handle_unusual;
}
break;
}
// optional bool adjustPrice = 8;
case 8: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) {
set_has_adjustprice();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &adjustprice_)));
} else {
goto handle_unusual;
}
break;
}
// optional double adjustSideAndLimit = 9;
case 9: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(73u /* 73 & 0xFF */)) {
set_has_adjustsideandlimit();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &adjustsideandlimit_)));
} else {
goto handle_unusual;
}
break;
}
// optional int32 secMarket = 10;
case 10: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(80u /* 80 & 0xFF */)) {
set_has_secmarket();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &secmarket_)));
} else {
goto handle_unusual;
}
break;
}
// optional string remark = 11;
case 11: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_remark()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->remark().data(), static_cast<int>(this->remark().length()),
::google::protobuf::internal::WireFormat::PARSE,
"Trd_PlaceOrder.C2S.remark");
} else {
goto handle_unusual;
}
break;
}
// optional int32 timeInForce = 12;
case 12: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(96u /* 96 & 0xFF */)) {
set_has_timeinforce();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &timeinforce_)));
} else {
goto handle_unusual;
}
break;
}
// optional bool fillOutsideRTH = 13;
case 13: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
set_has_filloutsiderth();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &filloutsiderth_)));
} else {
goto handle_unusual;
}
break;
}
// optional double auxPrice = 14;
case 14: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(113u /* 113 & 0xFF */)) {
set_has_auxprice();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &auxprice_)));
} else {
goto handle_unusual;
}
break;
}
// optional int32 trailType = 15;
case 15: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(120u /* 120 & 0xFF */)) {
set_has_trailtype();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &trailtype_)));
} else {
goto handle_unusual;
}
break;
}
// optional double trailValue = 16;
case 16: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(129u /* 129 & 0xFF */)) {
set_has_trailvalue();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &trailvalue_)));
} else {
goto handle_unusual;
}
break;
}
// optional double trailSpread = 17;
case 17: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(137u /* 137 & 0xFF */)) {
set_has_trailspread();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, &trailspread_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:Trd_PlaceOrder.C2S)
return true;
failure:
// @@protoc_insertion_point(parse_failure:Trd_PlaceOrder.C2S)
return false;
#undef DO_
}
void C2S::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:Trd_PlaceOrder.C2S)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required .Common.PacketID packetID = 1;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, *this->packetid_, output);
}
// required .Trd_Common.TrdHeader header = 2;
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, *this->header_, output);
}
// required int32 trdSide = 3;
if (cached_has_bits & 0x00000010u) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->trdside(), output);
}
// required int32 orderType = 4;
if (cached_has_bits & 0x00000020u) {
::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->ordertype(), output);
}
// required string code = 5;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->code().data(), static_cast<int>(this->code().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"Trd_PlaceOrder.C2S.code");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
5, this->code(), output);
}
// required double qty = 6;
if (cached_has_bits & 0x00000040u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->qty(), output);
}
// optional double price = 7;
if (cached_has_bits & 0x00000080u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(7, this->price(), output);
}
// optional bool adjustPrice = 8;
if (cached_has_bits & 0x00000400u) {
::google::protobuf::internal::WireFormatLite::WriteBool(8, this->adjustprice(), output);
}
// optional double adjustSideAndLimit = 9;
if (cached_has_bits & 0x00000100u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(9, this->adjustsideandlimit(), output);
}
// optional int32 secMarket = 10;
if (cached_has_bits & 0x00000200u) {
::google::protobuf::internal::WireFormatLite::WriteInt32(10, this->secmarket(), output);
}
// optional string remark = 11;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->remark().data(), static_cast<int>(this->remark().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"Trd_PlaceOrder.C2S.remark");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
11, this->remark(), output);
}
// optional int32 timeInForce = 12;
if (cached_has_bits & 0x00001000u) {
::google::protobuf::internal::WireFormatLite::WriteInt32(12, this->timeinforce(), output);
}
// optional bool fillOutsideRTH = 13;
if (cached_has_bits & 0x00000800u) {
::google::protobuf::internal::WireFormatLite::WriteBool(13, this->filloutsiderth(), output);
}
// optional double auxPrice = 14;
if (cached_has_bits & 0x00004000u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(14, this->auxprice(), output);
}
// optional int32 trailType = 15;
if (cached_has_bits & 0x00002000u) {
::google::protobuf::internal::WireFormatLite::WriteInt32(15, this->trailtype(), output);
}
// optional double trailValue = 16;
if (cached_has_bits & 0x00008000u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(16, this->trailvalue(), output);
}
// optional double trailSpread = 17;
if (cached_has_bits & 0x00010000u) {
::google::protobuf::internal::WireFormatLite::WriteDouble(17, this->trailspread(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:Trd_PlaceOrder.C2S)
}
::google::protobuf::uint8* C2S::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:Trd_PlaceOrder.C2S)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required .Common.PacketID packetID = 1;
if (cached_has_bits & 0x00000004u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
1, *this->packetid_, deterministic, target);
}
// required .Trd_Common.TrdHeader header = 2;
if (cached_has_bits & 0x00000008u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
2, *this->header_, deterministic, target);
}
// required int32 trdSide = 3;
if (cached_has_bits & 0x00000010u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->trdside(), target);
}
// required int32 orderType = 4;
if (cached_has_bits & 0x00000020u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->ordertype(), target);
}
// required string code = 5;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->code().data(), static_cast<int>(this->code().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"Trd_PlaceOrder.C2S.code");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
5, this->code(), target);
}
// required double qty = 6;
if (cached_has_bits & 0x00000040u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->qty(), target);
}
// optional double price = 7;
if (cached_has_bits & 0x00000080u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(7, this->price(), target);
}
// optional bool adjustPrice = 8;
if (cached_has_bits & 0x00000400u) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(8, this->adjustprice(), target);
}
// optional double adjustSideAndLimit = 9;
if (cached_has_bits & 0x00000100u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(9, this->adjustsideandlimit(), target);
}
// optional int32 secMarket = 10;
if (cached_has_bits & 0x00000200u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(10, this->secmarket(), target);
}
// optional string remark = 11;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->remark().data(), static_cast<int>(this->remark().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"Trd_PlaceOrder.C2S.remark");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
11, this->remark(), target);
}
// optional int32 timeInForce = 12;
if (cached_has_bits & 0x00001000u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(12, this->timeinforce(), target);
}
// optional bool fillOutsideRTH = 13;
if (cached_has_bits & 0x00000800u) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(13, this->filloutsiderth(), target);
}
// optional double auxPrice = 14;
if (cached_has_bits & 0x00004000u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(14, this->auxprice(), target);
}
// optional int32 trailType = 15;
if (cached_has_bits & 0x00002000u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(15, this->trailtype(), target);
}
// optional double trailValue = 16;
if (cached_has_bits & 0x00008000u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(16, this->trailvalue(), target);
}
// optional double trailSpread = 17;
if (cached_has_bits & 0x00010000u) {
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(17, this->trailspread(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:Trd_PlaceOrder.C2S)
return target;
}
size_t C2S::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:Trd_PlaceOrder.C2S)
size_t total_size = 0;
if (has_code()) {
// required string code = 5;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->code());
}
if (has_packetid()) {
// required .Common.PacketID packetID = 1;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->packetid_);
}
if (has_header()) {
// required .Trd_Common.TrdHeader header = 2;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->header_);
}
if (has_trdside()) {
// required int32 trdSide = 3;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->trdside());
}
if (has_ordertype()) {
// required int32 orderType = 4;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->ordertype());
}
if (has_qty()) {
// required double qty = 6;
total_size += 1 + 8;
}
return total_size;
}
size_t C2S::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Trd_PlaceOrder.C2S)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
if (((_has_bits_[0] & 0x0000007d) ^ 0x0000007d) == 0) { // All required fields are present.
// required string code = 5;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->code());
// required .Common.PacketID packetID = 1;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->packetid_);
// required .Trd_Common.TrdHeader header = 2;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->header_);
// required int32 trdSide = 3;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->trdside());
// required int32 orderType = 4;
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->ordertype());
// required double qty = 6;
total_size += 1 + 8;
} else {
total_size += RequiredFieldsByteSizeFallback();
}
// optional string remark = 11;
if (has_remark()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->remark());
}
// optional double price = 7;
if (has_price()) {
total_size += 1 + 8;
}
if (_has_bits_[8 / 32] & 65280u) {
// optional double adjustSideAndLimit = 9;
if (has_adjustsideandlimit()) {
total_size += 1 + 8;
}
// optional int32 secMarket = 10;
if (has_secmarket()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->secmarket());
}
// optional bool adjustPrice = 8;
if (has_adjustprice()) {
total_size += 1 + 1;
}
// optional bool fillOutsideRTH = 13;
if (has_filloutsiderth()) {
total_size += 1 + 1;
}
// optional int32 timeInForce = 12;
if (has_timeinforce()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->timeinforce());
}
// optional int32 trailType = 15;
if (has_trailtype()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->trailtype());
}
// optional double auxPrice = 14;
if (has_auxprice()) {
total_size += 1 + 8;
}
// optional double trailValue = 16;
if (has_trailvalue()) {
total_size += 2 + 8;
}
}
// optional double trailSpread = 17;
if (has_trailspread()) {
total_size += 2 + 8;
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void C2S::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Trd_PlaceOrder.C2S)
GOOGLE_DCHECK_NE(&from, this);
const C2S* source =
::google::protobuf::internal::DynamicCastToGenerated<const C2S>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:Trd_PlaceOrder.C2S)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:Trd_PlaceOrder.C2S)
MergeFrom(*source);
}
}
void C2S::MergeFrom(const C2S& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Trd_PlaceOrder.C2S)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 255u) {
if (cached_has_bits & 0x00000001u) {
set_has_code();
code_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.code_);
}
if (cached_has_bits & 0x00000002u) {
set_has_remark();
remark_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.remark_);
}
if (cached_has_bits & 0x00000004u) {
mutable_packetid()->::Common::PacketID::MergeFrom(from.packetid());
}
if (cached_has_bits & 0x00000008u) {
mutable_header()->::Trd_Common::TrdHeader::MergeFrom(from.header());
}
if (cached_has_bits & 0x00000010u) {
trdside_ = from.trdside_;
}
if (cached_has_bits & 0x00000020u) {
ordertype_ = from.ordertype_;
}
if (cached_has_bits & 0x00000040u) {
qty_ = from.qty_;
}
if (cached_has_bits & 0x00000080u) {
price_ = from.price_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 65280u) {
if (cached_has_bits & 0x00000100u) {
adjustsideandlimit_ = from.adjustsideandlimit_;
}
if (cached_has_bits & 0x00000200u) {
secmarket_ = from.secmarket_;
}
if (cached_has_bits & 0x00000400u) {
adjustprice_ = from.adjustprice_;
}
if (cached_has_bits & 0x00000800u) {
filloutsiderth_ = from.filloutsiderth_;
}
if (cached_has_bits & 0x00001000u) {
timeinforce_ = from.timeinforce_;
}
if (cached_has_bits & 0x00002000u) {
trailtype_ = from.trailtype_;
}
if (cached_has_bits & 0x00004000u) {
auxprice_ = from.auxprice_;
}
if (cached_has_bits & 0x00008000u) {
trailvalue_ = from.trailvalue_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0x00010000u) {
set_trailspread(from.trailspread());
}
}
void C2S::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:Trd_PlaceOrder.C2S)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void C2S::CopyFrom(const C2S& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Trd_PlaceOrder.C2S)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool C2S::IsInitialized() const {
if ((_has_bits_[0] & 0x0000007d) != 0x0000007d) return false;
if (has_packetid()) {
if (!this->packetid_->IsInitialized()) return false;
}
if (has_header()) {
if (!this->header_->IsInitialized()) return false;
}
return true;
}
void C2S::Swap(C2S* other) {
if (other == this) return;
InternalSwap(other);
}
void C2S::InternalSwap(C2S* other) {
using std::swap;
code_.Swap(&other->code_);
remark_.Swap(&other->remark_);
swap(packetid_, other->packetid_);
swap(header_, other->header_);
swap(trdside_, other->trdside_);
swap(ordertype_, other->ordertype_);
swap(qty_, other->qty_);
swap(price_, other->price_);
swap(adjustsideandlimit_, other->adjustsideandlimit_);
swap(secmarket_, other->secmarket_);
swap(adjustprice_, other->adjustprice_);
swap(filloutsiderth_, other->filloutsiderth_);
swap(timeinforce_, other->timeinforce_);
swap(trailtype_, other->trailtype_);
swap(auxprice_, other->auxprice_);
swap(trailvalue_, other->trailvalue_);
swap(trailspread_, other->trailspread_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata C2S::GetMetadata() const {
protobuf_Trd_5fPlaceOrder_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fPlaceOrder_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void S2C::InitAsDefaultInstance() {
::Trd_PlaceOrder::_S2C_default_instance_._instance.get_mutable()->header_ = const_cast< ::Trd_Common::TrdHeader*>(
::Trd_Common::TrdHeader::internal_default_instance());
}
void S2C::clear_header() {
if (header_ != NULL) header_->Clear();
clear_has_header();
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int S2C::kHeaderFieldNumber;
const int S2C::kOrderIDFieldNumber;
const int S2C::kOrderIDExFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
S2C::S2C()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_Trd_5fPlaceOrder_2eproto::InitDefaultsS2C();
}
SharedCtor();
// @@protoc_insertion_point(constructor:Trd_PlaceOrder.S2C)
}
S2C::S2C(const S2C& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
orderidex_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_orderidex()) {
orderidex_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.orderidex_);
}
if (from.has_header()) {
header_ = new ::Trd_Common::TrdHeader(*from.header_);
} else {
header_ = NULL;
}
orderid_ = from.orderid_;
// @@protoc_insertion_point(copy_constructor:Trd_PlaceOrder.S2C)
}
void S2C::SharedCtor() {
_cached_size_ = 0;
orderidex_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&header_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&orderid_) -
reinterpret_cast<char*>(&header_)) + sizeof(orderid_));
}
S2C::~S2C() {
// @@protoc_insertion_point(destructor:Trd_PlaceOrder.S2C)
SharedDtor();
}
void S2C::SharedDtor() {
orderidex_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete header_;
}
void S2C::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* S2C::descriptor() {
::protobuf_Trd_5fPlaceOrder_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fPlaceOrder_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const S2C& S2C::default_instance() {
::protobuf_Trd_5fPlaceOrder_2eproto::InitDefaultsS2C();
return *internal_default_instance();
}
S2C* S2C::New(::google::protobuf::Arena* arena) const {
S2C* n = new S2C;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void S2C::Clear() {
// @@protoc_insertion_point(message_clear_start:Trd_PlaceOrder.S2C)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 3u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!orderidex_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*orderidex_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(header_ != NULL);
header_->Clear();
}
}
orderid_ = GOOGLE_ULONGLONG(0);
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool S2C::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:Trd_PlaceOrder.S2C)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .Trd_Common.TrdHeader header = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_header()));
} else {
goto handle_unusual;
}
break;
}
// optional uint64 orderID = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
set_has_orderid();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, &orderid_)));
} else {
goto handle_unusual;
}
break;
}
// optional string orderIDEx = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_orderidex()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->orderidex().data(), static_cast<int>(this->orderidex().length()),
::google::protobuf::internal::WireFormat::PARSE,
"Trd_PlaceOrder.S2C.orderIDEx");
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:Trd_PlaceOrder.S2C)
return true;
failure:
// @@protoc_insertion_point(parse_failure:Trd_PlaceOrder.S2C)
return false;
#undef DO_
}
void S2C::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:Trd_PlaceOrder.S2C)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required .Trd_Common.TrdHeader header = 1;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, *this->header_, output);
}
// optional uint64 orderID = 2;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->orderid(), output);
}
// optional string orderIDEx = 3;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->orderidex().data(), static_cast<int>(this->orderidex().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"Trd_PlaceOrder.S2C.orderIDEx");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->orderidex(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:Trd_PlaceOrder.S2C)
}
::google::protobuf::uint8* S2C::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:Trd_PlaceOrder.S2C)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required .Trd_Common.TrdHeader header = 1;
if (cached_has_bits & 0x00000002u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
1, *this->header_, deterministic, target);
}
// optional uint64 orderID = 2;
if (cached_has_bits & 0x00000004u) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, this->orderid(), target);
}
// optional string orderIDEx = 3;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->orderidex().data(), static_cast<int>(this->orderidex().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"Trd_PlaceOrder.S2C.orderIDEx");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3, this->orderidex(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:Trd_PlaceOrder.S2C)
return target;
}
size_t S2C::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Trd_PlaceOrder.S2C)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// required .Trd_Common.TrdHeader header = 1;
if (has_header()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->header_);
}
// optional string orderIDEx = 3;
if (has_orderidex()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->orderidex());
}
// optional uint64 orderID = 2;
if (has_orderid()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt64Size(
this->orderid());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void S2C::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Trd_PlaceOrder.S2C)
GOOGLE_DCHECK_NE(&from, this);
const S2C* source =
::google::protobuf::internal::DynamicCastToGenerated<const S2C>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:Trd_PlaceOrder.S2C)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:Trd_PlaceOrder.S2C)
MergeFrom(*source);
}
}
void S2C::MergeFrom(const S2C& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Trd_PlaceOrder.S2C)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 7u) {
if (cached_has_bits & 0x00000001u) {
set_has_orderidex();
orderidex_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.orderidex_);
}
if (cached_has_bits & 0x00000002u) {
mutable_header()->::Trd_Common::TrdHeader::MergeFrom(from.header());
}
if (cached_has_bits & 0x00000004u) {
orderid_ = from.orderid_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void S2C::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:Trd_PlaceOrder.S2C)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void S2C::CopyFrom(const S2C& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Trd_PlaceOrder.S2C)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool S2C::IsInitialized() const {
if ((_has_bits_[0] & 0x00000002) != 0x00000002) return false;
if (has_header()) {
if (!this->header_->IsInitialized()) return false;
}
return true;
}
void S2C::Swap(S2C* other) {
if (other == this) return;
InternalSwap(other);
}
void S2C::InternalSwap(S2C* other) {
using std::swap;
orderidex_.Swap(&other->orderidex_);
swap(header_, other->header_);
swap(orderid_, other->orderid_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata S2C::GetMetadata() const {
protobuf_Trd_5fPlaceOrder_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fPlaceOrder_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void Request::InitAsDefaultInstance() {
::Trd_PlaceOrder::_Request_default_instance_._instance.get_mutable()->c2s_ = const_cast< ::Trd_PlaceOrder::C2S*>(
::Trd_PlaceOrder::C2S::internal_default_instance());
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Request::kC2SFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Request::Request()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_Trd_5fPlaceOrder_2eproto::InitDefaultsRequest();
}
SharedCtor();
// @@protoc_insertion_point(constructor:Trd_PlaceOrder.Request)
}
Request::Request(const Request& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_c2s()) {
c2s_ = new ::Trd_PlaceOrder::C2S(*from.c2s_);
} else {
c2s_ = NULL;
}
// @@protoc_insertion_point(copy_constructor:Trd_PlaceOrder.Request)
}
void Request::SharedCtor() {
_cached_size_ = 0;
c2s_ = NULL;
}
Request::~Request() {
// @@protoc_insertion_point(destructor:Trd_PlaceOrder.Request)
SharedDtor();
}
void Request::SharedDtor() {
if (this != internal_default_instance()) delete c2s_;
}
void Request::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Request::descriptor() {
::protobuf_Trd_5fPlaceOrder_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fPlaceOrder_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const Request& Request::default_instance() {
::protobuf_Trd_5fPlaceOrder_2eproto::InitDefaultsRequest();
return *internal_default_instance();
}
Request* Request::New(::google::protobuf::Arena* arena) const {
Request* n = new Request;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Request::Clear() {
// @@protoc_insertion_point(message_clear_start:Trd_PlaceOrder.Request)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(c2s_ != NULL);
c2s_->Clear();
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool Request::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:Trd_PlaceOrder.Request)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required .Trd_PlaceOrder.C2S c2s = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_c2s()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:Trd_PlaceOrder.Request)
return true;
failure:
// @@protoc_insertion_point(parse_failure:Trd_PlaceOrder.Request)
return false;
#undef DO_
}
void Request::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:Trd_PlaceOrder.Request)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required .Trd_PlaceOrder.C2S c2s = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, *this->c2s_, output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:Trd_PlaceOrder.Request)
}
::google::protobuf::uint8* Request::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:Trd_PlaceOrder.Request)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required .Trd_PlaceOrder.C2S c2s = 1;
if (cached_has_bits & 0x00000001u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
1, *this->c2s_, deterministic, target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:Trd_PlaceOrder.Request)
return target;
}
size_t Request::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Trd_PlaceOrder.Request)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// required .Trd_PlaceOrder.C2S c2s = 1;
if (has_c2s()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->c2s_);
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Request::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Trd_PlaceOrder.Request)
GOOGLE_DCHECK_NE(&from, this);
const Request* source =
::google::protobuf::internal::DynamicCastToGenerated<const Request>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:Trd_PlaceOrder.Request)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:Trd_PlaceOrder.Request)
MergeFrom(*source);
}
}
void Request::MergeFrom(const Request& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Trd_PlaceOrder.Request)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.has_c2s()) {
mutable_c2s()->::Trd_PlaceOrder::C2S::MergeFrom(from.c2s());
}
}
void Request::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:Trd_PlaceOrder.Request)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Request::CopyFrom(const Request& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Trd_PlaceOrder.Request)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Request::IsInitialized() const {
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
if (has_c2s()) {
if (!this->c2s_->IsInitialized()) return false;
}
return true;
}
void Request::Swap(Request* other) {
if (other == this) return;
InternalSwap(other);
}
void Request::InternalSwap(Request* other) {
using std::swap;
swap(c2s_, other->c2s_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Request::GetMetadata() const {
protobuf_Trd_5fPlaceOrder_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fPlaceOrder_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void Response::InitAsDefaultInstance() {
::Trd_PlaceOrder::_Response_default_instance_._instance.get_mutable()->s2c_ = const_cast< ::Trd_PlaceOrder::S2C*>(
::Trd_PlaceOrder::S2C::internal_default_instance());
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Response::kRetTypeFieldNumber;
const int Response::kRetMsgFieldNumber;
const int Response::kErrCodeFieldNumber;
const int Response::kS2CFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
Response::Response()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_Trd_5fPlaceOrder_2eproto::InitDefaultsResponse();
}
SharedCtor();
// @@protoc_insertion_point(constructor:Trd_PlaceOrder.Response)
}
Response::Response(const Response& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
retmsg_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_retmsg()) {
retmsg_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.retmsg_);
}
if (from.has_s2c()) {
s2c_ = new ::Trd_PlaceOrder::S2C(*from.s2c_);
} else {
s2c_ = NULL;
}
::memcpy(&errcode_, &from.errcode_,
static_cast<size_t>(reinterpret_cast<char*>(&rettype_) -
reinterpret_cast<char*>(&errcode_)) + sizeof(rettype_));
// @@protoc_insertion_point(copy_constructor:Trd_PlaceOrder.Response)
}
void Response::SharedCtor() {
_cached_size_ = 0;
retmsg_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&s2c_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&errcode_) -
reinterpret_cast<char*>(&s2c_)) + sizeof(errcode_));
rettype_ = -400;
}
Response::~Response() {
// @@protoc_insertion_point(destructor:Trd_PlaceOrder.Response)
SharedDtor();
}
void Response::SharedDtor() {
retmsg_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete s2c_;
}
void Response::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Response::descriptor() {
::protobuf_Trd_5fPlaceOrder_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fPlaceOrder_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const Response& Response::default_instance() {
::protobuf_Trd_5fPlaceOrder_2eproto::InitDefaultsResponse();
return *internal_default_instance();
}
Response* Response::New(::google::protobuf::Arena* arena) const {
Response* n = new Response;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void Response::Clear() {
// @@protoc_insertion_point(message_clear_start:Trd_PlaceOrder.Response)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 3u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!retmsg_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*retmsg_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(s2c_ != NULL);
s2c_->Clear();
}
}
if (cached_has_bits & 12u) {
errcode_ = 0;
rettype_ = -400;
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool Response::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:Trd_PlaceOrder.Response)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// required int32 retType = 1 [default = -400];
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
set_has_rettype();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &rettype_)));
} else {
goto handle_unusual;
}
break;
}
// optional string retMsg = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_retmsg()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->retmsg().data(), static_cast<int>(this->retmsg().length()),
::google::protobuf::internal::WireFormat::PARSE,
"Trd_PlaceOrder.Response.retMsg");
} else {
goto handle_unusual;
}
break;
}
// optional int32 errCode = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
set_has_errcode();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &errcode_)));
} else {
goto handle_unusual;
}
break;
}
// optional .Trd_PlaceOrder.S2C s2c = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_s2c()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:Trd_PlaceOrder.Response)
return true;
failure:
// @@protoc_insertion_point(parse_failure:Trd_PlaceOrder.Response)
return false;
#undef DO_
}
void Response::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:Trd_PlaceOrder.Response)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required int32 retType = 1 [default = -400];
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->rettype(), output);
}
// optional string retMsg = 2;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->retmsg().data(), static_cast<int>(this->retmsg().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"Trd_PlaceOrder.Response.retMsg");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->retmsg(), output);
}
// optional int32 errCode = 3;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->errcode(), output);
}
// optional .Trd_PlaceOrder.S2C s2c = 4;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
4, *this->s2c_, output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:Trd_PlaceOrder.Response)
}
::google::protobuf::uint8* Response::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:Trd_PlaceOrder.Response)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required int32 retType = 1 [default = -400];
if (cached_has_bits & 0x00000008u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->rettype(), target);
}
// optional string retMsg = 2;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->retmsg().data(), static_cast<int>(this->retmsg().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"Trd_PlaceOrder.Response.retMsg");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->retmsg(), target);
}
// optional int32 errCode = 3;
if (cached_has_bits & 0x00000004u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->errcode(), target);
}
// optional .Trd_PlaceOrder.S2C s2c = 4;
if (cached_has_bits & 0x00000002u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
4, *this->s2c_, deterministic, target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:Trd_PlaceOrder.Response)
return target;
}
size_t Response::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Trd_PlaceOrder.Response)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// required int32 retType = 1 [default = -400];
if (has_rettype()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->rettype());
}
if (_has_bits_[0 / 32] & 7u) {
// optional string retMsg = 2;
if (has_retmsg()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->retmsg());
}
// optional .Trd_PlaceOrder.S2C s2c = 4;
if (has_s2c()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->s2c_);
}
// optional int32 errCode = 3;
if (has_errcode()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->errcode());
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Response::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Trd_PlaceOrder.Response)
GOOGLE_DCHECK_NE(&from, this);
const Response* source =
::google::protobuf::internal::DynamicCastToGenerated<const Response>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:Trd_PlaceOrder.Response)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:Trd_PlaceOrder.Response)
MergeFrom(*source);
}
}
void Response::MergeFrom(const Response& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Trd_PlaceOrder.Response)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 15u) {
if (cached_has_bits & 0x00000001u) {
set_has_retmsg();
retmsg_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.retmsg_);
}
if (cached_has_bits & 0x00000002u) {
mutable_s2c()->::Trd_PlaceOrder::S2C::MergeFrom(from.s2c());
}
if (cached_has_bits & 0x00000004u) {
errcode_ = from.errcode_;
}
if (cached_has_bits & 0x00000008u) {
rettype_ = from.rettype_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void Response::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:Trd_PlaceOrder.Response)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Response::CopyFrom(const Response& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Trd_PlaceOrder.Response)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Response::IsInitialized() const {
if ((_has_bits_[0] & 0x00000008) != 0x00000008) return false;
if (has_s2c()) {
if (!this->s2c_->IsInitialized()) return false;
}
return true;
}
void Response::Swap(Response* other) {
if (other == this) return;
InternalSwap(other);
}
void Response::InternalSwap(Response* other) {
using std::swap;
retmsg_.Swap(&other->retmsg_);
swap(s2c_, other->s2c_);
swap(errcode_, other->errcode_);
swap(rettype_, other->rettype_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata Response::GetMetadata() const {
protobuf_Trd_5fPlaceOrder_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_Trd_5fPlaceOrder_2eproto::file_level_metadata[kIndexInFileMessages];
}
// @@protoc_insertion_point(namespace_scope)
} // namespace Trd_PlaceOrder
// @@protoc_insertion_point(global_scope)