| // Generated by the protocol buffer compiler. DO NOT EDIT! |
| // source: Types.proto |
| |
| #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION |
| #include "Types.pb.h" |
| |
| #include <algorithm> |
| |
| #include <google/protobuf/stubs/common.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> |
| // @@protoc_insertion_point(includes) |
| |
| namespace common { |
| |
| namespace { |
| |
| const ::google::protobuf::Descriptor* MajorType_descriptor_ = NULL; |
| const ::google::protobuf::internal::GeneratedMessageReflection* |
| MajorType_reflection_ = NULL; |
| const ::google::protobuf::EnumDescriptor* MinorType_descriptor_ = NULL; |
| const ::google::protobuf::EnumDescriptor* DataMode_descriptor_ = NULL; |
| |
| } // namespace |
| |
| |
| void protobuf_AssignDesc_Types_2eproto() { |
| protobuf_AddDesc_Types_2eproto(); |
| const ::google::protobuf::FileDescriptor* file = |
| ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( |
| "Types.proto"); |
| GOOGLE_CHECK(file != NULL); |
| MajorType_descriptor_ = file->message_type(0); |
| static const int MajorType_offsets_[7] = { |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, minor_type_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, mode_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, width_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, precision_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, scale_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, timezone_), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, sub_type_), |
| }; |
| MajorType_reflection_ = |
| new ::google::protobuf::internal::GeneratedMessageReflection( |
| MajorType_descriptor_, |
| MajorType::default_instance_, |
| MajorType_offsets_, |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, _has_bits_[0]), |
| GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MajorType, _unknown_fields_), |
| -1, |
| ::google::protobuf::DescriptorPool::generated_pool(), |
| ::google::protobuf::MessageFactory::generated_factory(), |
| sizeof(MajorType)); |
| MinorType_descriptor_ = file->enum_type(0); |
| DataMode_descriptor_ = file->enum_type(1); |
| } |
| |
| namespace { |
| |
| GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); |
| inline void protobuf_AssignDescriptorsOnce() { |
| ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, |
| &protobuf_AssignDesc_Types_2eproto); |
| } |
| |
| void protobuf_RegisterTypes(const ::std::string&) { |
| protobuf_AssignDescriptorsOnce(); |
| ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( |
| MajorType_descriptor_, &MajorType::default_instance()); |
| } |
| |
| } // namespace |
| |
| void protobuf_ShutdownFile_Types_2eproto() { |
| delete MajorType::default_instance_; |
| delete MajorType_reflection_; |
| } |
| |
| void protobuf_AddDesc_Types_2eproto() { |
| static bool already_here = false; |
| if (already_here) return; |
| already_here = true; |
| GOOGLE_PROTOBUF_VERIFY_VERSION; |
| |
| ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
| "\n\013Types.proto\022\006common\"\272\001\n\tMajorType\022%\n\nm" |
| "inor_type\030\001 \001(\0162\021.common.MinorType\022\036\n\004mo" |
| "de\030\002 \001(\0162\020.common.DataMode\022\r\n\005width\030\003 \001(" |
| "\005\022\021\n\tprecision\030\004 \001(\005\022\r\n\005scale\030\005 \001(\005\022\020\n\010t" |
| "imeZone\030\006 \001(\005\022#\n\010sub_type\030\007 \003(\0162\021.common" |
| ".MinorType*\253\004\n\tMinorType\022\010\n\004LATE\020\000\022\007\n\003MA" |
| "P\020\001\022\013\n\007TINYINT\020\003\022\014\n\010SMALLINT\020\004\022\007\n\003INT\020\005\022" |
| "\n\n\006BIGINT\020\006\022\014\n\010DECIMAL9\020\007\022\r\n\tDECIMAL18\020\010" |
| "\022\023\n\017DECIMAL28SPARSE\020\t\022\023\n\017DECIMAL38SPARSE" |
| "\020\n\022\t\n\005MONEY\020\013\022\010\n\004DATE\020\014\022\010\n\004TIME\020\r\022\n\n\006TIM" |
| "ETZ\020\016\022\017\n\013TIMESTAMPTZ\020\017\022\r\n\tTIMESTAMP\020\020\022\014\n" |
| "\010INTERVAL\020\021\022\n\n\006FLOAT4\020\022\022\n\n\006FLOAT8\020\023\022\007\n\003B" |
| "IT\020\024\022\r\n\tFIXEDCHAR\020\025\022\017\n\013FIXED16CHAR\020\026\022\017\n\013" |
| "FIXEDBINARY\020\027\022\013\n\007VARCHAR\020\030\022\r\n\tVAR16CHAR\020" |
| "\031\022\r\n\tVARBINARY\020\032\022\t\n\005UINT1\020\035\022\t\n\005UINT2\020\036\022\t" |
| "\n\005UINT4\020\037\022\t\n\005UINT8\020 \022\022\n\016DECIMAL28DENSE\020!" |
| "\022\022\n\016DECIMAL38DENSE\020\"\022\016\n\nDM_UNKNOWN\020%\022\020\n\014" |
| "INTERVALYEAR\020&\022\017\n\013INTERVALDAY\020\'\022\010\n\004LIST\020" |
| "(\022\022\n\016GENERIC_OBJECT\020)\022\t\n\005UNION\020*\022\016\n\nVARD" |
| "ECIMAL\020+*=\n\010DataMode\022\017\n\013DM_OPTIONAL\020\000\022\017\n" |
| "\013DM_REQUIRED\020\001\022\017\n\013DM_REPEATED\020\002B-\n\035org.a" |
| "pache.drill.common.typesB\nTypeProtosH\001", 878); |
| ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
| "Types.proto", &protobuf_RegisterTypes); |
| MajorType::default_instance_ = new MajorType(); |
| MajorType::default_instance_->InitAsDefaultInstance(); |
| ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_Types_2eproto); |
| } |
| |
| // Force AddDescriptors() to be called at static initialization time. |
| struct StaticDescriptorInitializer_Types_2eproto { |
| StaticDescriptorInitializer_Types_2eproto() { |
| protobuf_AddDesc_Types_2eproto(); |
| } |
| } static_descriptor_initializer_Types_2eproto_; |
| const ::google::protobuf::EnumDescriptor* MinorType_descriptor() { |
| protobuf_AssignDescriptorsOnce(); |
| return MinorType_descriptor_; |
| } |
| bool MinorType_IsValid(int value) { |
| switch(value) { |
| case 0: |
| case 1: |
| case 3: |
| case 4: |
| case 5: |
| case 6: |
| case 7: |
| case 8: |
| case 9: |
| case 10: |
| case 11: |
| case 12: |
| case 13: |
| case 14: |
| case 15: |
| case 16: |
| case 17: |
| case 18: |
| case 19: |
| case 20: |
| case 21: |
| case 22: |
| case 23: |
| case 24: |
| case 25: |
| case 26: |
| case 29: |
| case 30: |
| case 31: |
| case 32: |
| case 33: |
| case 34: |
| case 37: |
| case 38: |
| case 39: |
| case 40: |
| case 41: |
| case 42: |
| case 43: |
| return true; |
| default: |
| return false; |
| } |
| } |
| |
| const ::google::protobuf::EnumDescriptor* DataMode_descriptor() { |
| protobuf_AssignDescriptorsOnce(); |
| return DataMode_descriptor_; |
| } |
| bool DataMode_IsValid(int value) { |
| switch(value) { |
| case 0: |
| case 1: |
| case 2: |
| return true; |
| default: |
| return false; |
| } |
| } |
| |
| |
| // =================================================================== |
| |
| #ifndef _MSC_VER |
| const int MajorType::kMinorTypeFieldNumber; |
| const int MajorType::kModeFieldNumber; |
| const int MajorType::kWidthFieldNumber; |
| const int MajorType::kPrecisionFieldNumber; |
| const int MajorType::kScaleFieldNumber; |
| const int MajorType::kTimeZoneFieldNumber; |
| const int MajorType::kSubTypeFieldNumber; |
| #endif // !_MSC_VER |
| |
| MajorType::MajorType() |
| : ::google::protobuf::Message() { |
| SharedCtor(); |
| } |
| |
| void MajorType::InitAsDefaultInstance() { |
| } |
| |
| MajorType::MajorType(const MajorType& from) |
| : ::google::protobuf::Message() { |
| SharedCtor(); |
| MergeFrom(from); |
| } |
| |
| void MajorType::SharedCtor() { |
| _cached_size_ = 0; |
| minor_type_ = 0; |
| mode_ = 0; |
| width_ = 0; |
| precision_ = 0; |
| scale_ = 0; |
| timezone_ = 0; |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| } |
| |
| MajorType::~MajorType() { |
| SharedDtor(); |
| } |
| |
| void MajorType::SharedDtor() { |
| if (this != default_instance_) { |
| } |
| } |
| |
| void MajorType::SetCachedSize(int size) const { |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| } |
| const ::google::protobuf::Descriptor* MajorType::descriptor() { |
| protobuf_AssignDescriptorsOnce(); |
| return MajorType_descriptor_; |
| } |
| |
| const MajorType& MajorType::default_instance() { |
| if (default_instance_ == NULL) protobuf_AddDesc_Types_2eproto(); |
| return *default_instance_; |
| } |
| |
| MajorType* MajorType::default_instance_ = NULL; |
| |
| MajorType* MajorType::New() const { |
| return new MajorType; |
| } |
| |
| void MajorType::Clear() { |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| minor_type_ = 0; |
| mode_ = 0; |
| width_ = 0; |
| precision_ = 0; |
| scale_ = 0; |
| timezone_ = 0; |
| } |
| sub_type_.Clear(); |
| ::memset(_has_bits_, 0, sizeof(_has_bits_)); |
| mutable_unknown_fields()->Clear(); |
| } |
| |
| bool MajorType::MergePartialFromCodedStream( |
| ::google::protobuf::io::CodedInputStream* input) { |
| #define DO_(EXPRESSION) if (!(EXPRESSION)) return false |
| ::google::protobuf::uint32 tag; |
| while ((tag = input->ReadTag()) != 0) { |
| switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
| // optional .common.MinorType minor_type = 1; |
| case 1: { |
| if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { |
| int value; |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| if (::common::MinorType_IsValid(value)) { |
| set_minor_type(static_cast< ::common::MinorType >(value)); |
| } else { |
| mutable_unknown_fields()->AddVarint(1, value); |
| } |
| } else { |
| goto handle_uninterpreted; |
| } |
| if (input->ExpectTag(16)) goto parse_mode; |
| break; |
| } |
| |
| // optional .common.DataMode mode = 2; |
| case 2: { |
| if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { |
| parse_mode: |
| int value; |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| if (::common::DataMode_IsValid(value)) { |
| set_mode(static_cast< ::common::DataMode >(value)); |
| } else { |
| mutable_unknown_fields()->AddVarint(2, value); |
| } |
| } else { |
| goto handle_uninterpreted; |
| } |
| if (input->ExpectTag(24)) goto parse_width; |
| break; |
| } |
| |
| // optional int32 width = 3; |
| case 3: { |
| if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { |
| parse_width: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| input, &width_))); |
| set_has_width(); |
| } else { |
| goto handle_uninterpreted; |
| } |
| if (input->ExpectTag(32)) goto parse_precision; |
| break; |
| } |
| |
| // optional int32 precision = 4; |
| case 4: { |
| if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { |
| parse_precision: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| input, &precision_))); |
| set_has_precision(); |
| } else { |
| goto handle_uninterpreted; |
| } |
| if (input->ExpectTag(40)) goto parse_scale; |
| break; |
| } |
| |
| // optional int32 scale = 5; |
| case 5: { |
| if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { |
| parse_scale: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| input, &scale_))); |
| set_has_scale(); |
| } else { |
| goto handle_uninterpreted; |
| } |
| if (input->ExpectTag(48)) goto parse_timeZone; |
| break; |
| } |
| |
| // optional int32 timeZone = 6; |
| case 6: { |
| if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { |
| parse_timeZone: |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
| input, &timezone_))); |
| set_has_timezone(); |
| } else { |
| goto handle_uninterpreted; |
| } |
| if (input->ExpectTag(56)) goto parse_sub_type; |
| break; |
| } |
| |
| // repeated .common.MinorType sub_type = 7; |
| case 7: { |
| if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { |
| parse_sub_type: |
| int value; |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
| int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( |
| input, &value))); |
| if (::common::MinorType_IsValid(value)) { |
| add_sub_type(static_cast< ::common::MinorType >(value)); |
| } else { |
| mutable_unknown_fields()->AddVarint(7, value); |
| } |
| } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) |
| == ::google::protobuf::internal::WireFormatLite:: |
| WIRETYPE_LENGTH_DELIMITED) { |
| DO_((::google::protobuf::internal::WireFormatLite::ReadPackedEnumNoInline( |
| input, |
| &::common::MinorType_IsValid, |
| this->mutable_sub_type()))); |
| } else { |
| goto handle_uninterpreted; |
| } |
| if (input->ExpectTag(56)) goto parse_sub_type; |
| if (input->ExpectAtEnd()) return true; |
| break; |
| } |
| |
| default: { |
| handle_uninterpreted: |
| if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == |
| ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { |
| return true; |
| } |
| DO_(::google::protobuf::internal::WireFormat::SkipField( |
| input, tag, mutable_unknown_fields())); |
| break; |
| } |
| } |
| } |
| return true; |
| #undef DO_ |
| } |
| |
| void MajorType::SerializeWithCachedSizes( |
| ::google::protobuf::io::CodedOutputStream* output) const { |
| // optional .common.MinorType minor_type = 1; |
| if (has_minor_type()) { |
| ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 1, this->minor_type(), output); |
| } |
| |
| // optional .common.DataMode mode = 2; |
| if (has_mode()) { |
| ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 2, this->mode(), output); |
| } |
| |
| // optional int32 width = 3; |
| if (has_width()) { |
| ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->width(), output); |
| } |
| |
| // optional int32 precision = 4; |
| if (has_precision()) { |
| ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->precision(), output); |
| } |
| |
| // optional int32 scale = 5; |
| if (has_scale()) { |
| ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->scale(), output); |
| } |
| |
| // optional int32 timeZone = 6; |
| if (has_timezone()) { |
| ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->timezone(), output); |
| } |
| |
| // repeated .common.MinorType sub_type = 7; |
| for (int i = 0; i < this->sub_type_size(); i++) { |
| ::google::protobuf::internal::WireFormatLite::WriteEnum( |
| 7, this->sub_type(i), output); |
| } |
| |
| if (!unknown_fields().empty()) { |
| ::google::protobuf::internal::WireFormat::SerializeUnknownFields( |
| unknown_fields(), output); |
| } |
| } |
| |
| ::google::protobuf::uint8* MajorType::SerializeWithCachedSizesToArray( |
| ::google::protobuf::uint8* target) const { |
| // optional .common.MinorType minor_type = 1; |
| if (has_minor_type()) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 1, this->minor_type(), target); |
| } |
| |
| // optional .common.DataMode mode = 2; |
| if (has_mode()) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 2, this->mode(), target); |
| } |
| |
| // optional int32 width = 3; |
| if (has_width()) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->width(), target); |
| } |
| |
| // optional int32 precision = 4; |
| if (has_precision()) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->precision(), target); |
| } |
| |
| // optional int32 scale = 5; |
| if (has_scale()) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->scale(), target); |
| } |
| |
| // optional int32 timeZone = 6; |
| if (has_timezone()) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->timezone(), target); |
| } |
| |
| // repeated .common.MinorType sub_type = 7; |
| for (int i = 0; i < this->sub_type_size(); i++) { |
| target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( |
| 7, this->sub_type(i), target); |
| } |
| |
| if (!unknown_fields().empty()) { |
| target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( |
| unknown_fields(), target); |
| } |
| return target; |
| } |
| |
| int MajorType::ByteSize() const { |
| int total_size = 0; |
| |
| if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| // optional .common.MinorType minor_type = 1; |
| if (has_minor_type()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->minor_type()); |
| } |
| |
| // optional .common.DataMode mode = 2; |
| if (has_mode()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::EnumSize(this->mode()); |
| } |
| |
| // optional int32 width = 3; |
| if (has_width()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::Int32Size( |
| this->width()); |
| } |
| |
| // optional int32 precision = 4; |
| if (has_precision()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::Int32Size( |
| this->precision()); |
| } |
| |
| // optional int32 scale = 5; |
| if (has_scale()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::Int32Size( |
| this->scale()); |
| } |
| |
| // optional int32 timeZone = 6; |
| if (has_timezone()) { |
| total_size += 1 + |
| ::google::protobuf::internal::WireFormatLite::Int32Size( |
| this->timezone()); |
| } |
| |
| } |
| // repeated .common.MinorType sub_type = 7; |
| { |
| int data_size = 0; |
| for (int i = 0; i < this->sub_type_size(); i++) { |
| data_size += ::google::protobuf::internal::WireFormatLite::EnumSize( |
| this->sub_type(i)); |
| } |
| total_size += 1 * this->sub_type_size() + data_size; |
| } |
| |
| if (!unknown_fields().empty()) { |
| total_size += |
| ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( |
| unknown_fields()); |
| } |
| GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
| _cached_size_ = total_size; |
| GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
| return total_size; |
| } |
| |
| void MajorType::MergeFrom(const ::google::protobuf::Message& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| const MajorType* source = |
| ::google::protobuf::internal::dynamic_cast_if_available<const MajorType*>( |
| &from); |
| if (source == NULL) { |
| ::google::protobuf::internal::ReflectionOps::Merge(from, this); |
| } else { |
| MergeFrom(*source); |
| } |
| } |
| |
| void MajorType::MergeFrom(const MajorType& from) { |
| GOOGLE_CHECK_NE(&from, this); |
| sub_type_.MergeFrom(from.sub_type_); |
| if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { |
| if (from.has_minor_type()) { |
| set_minor_type(from.minor_type()); |
| } |
| if (from.has_mode()) { |
| set_mode(from.mode()); |
| } |
| if (from.has_width()) { |
| set_width(from.width()); |
| } |
| if (from.has_precision()) { |
| set_precision(from.precision()); |
| } |
| if (from.has_scale()) { |
| set_scale(from.scale()); |
| } |
| if (from.has_timezone()) { |
| set_timezone(from.timezone()); |
| } |
| } |
| mutable_unknown_fields()->MergeFrom(from.unknown_fields()); |
| } |
| |
| void MajorType::CopyFrom(const ::google::protobuf::Message& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| void MajorType::CopyFrom(const MajorType& from) { |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool MajorType::IsInitialized() const { |
| |
| return true; |
| } |
| |
| void MajorType::Swap(MajorType* other) { |
| if (other != this) { |
| std::swap(minor_type_, other->minor_type_); |
| std::swap(mode_, other->mode_); |
| std::swap(width_, other->width_); |
| std::swap(precision_, other->precision_); |
| std::swap(scale_, other->scale_); |
| std::swap(timezone_, other->timezone_); |
| sub_type_.Swap(&other->sub_type_); |
| std::swap(_has_bits_[0], other->_has_bits_[0]); |
| _unknown_fields_.Swap(&other->_unknown_fields_); |
| std::swap(_cached_size_, other->_cached_size_); |
| } |
| } |
| |
| ::google::protobuf::Metadata MajorType::GetMetadata() const { |
| protobuf_AssignDescriptorsOnce(); |
| ::google::protobuf::Metadata metadata; |
| metadata.descriptor = MajorType_descriptor_; |
| metadata.reflection = MajorType_reflection_; |
| return metadata; |
| } |
| |
| |
| // @@protoc_insertion_point(namespace_scope) |
| |
| } // namespace common |
| |
| // @@protoc_insertion_point(global_scope) |