You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ja...@apache.org on 2014/05/30 01:45:15 UTC
[06/15] DRILL-423: C++ Client. Initial implementation (reviewed)
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/e1e5ea0e/contrib/native/client/src/protobuf/SchemaDef.pb.h
----------------------------------------------------------------------
diff --git a/contrib/native/client/src/protobuf/SchemaDef.pb.h b/contrib/native/client/src/protobuf/SchemaDef.pb.h
new file mode 100644
index 0000000..ee01845
--- /dev/null
+++ b/contrib/native/client/src/protobuf/SchemaDef.pb.h
@@ -0,0 +1,85 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: SchemaDef.proto
+
+#ifndef PROTOBUF_SchemaDef_2eproto__INCLUDED
+#define PROTOBUF_SchemaDef_2eproto__INCLUDED
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 2005000
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please update
+#error your headers.
+#endif
+#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers. Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/repeated_field.h>
+#include <google/protobuf/extension_set.h>
+#include <google/protobuf/generated_enum_reflection.h>
+#include "Types.pb.h"
+// @@protoc_insertion_point(includes)
+
+namespace exec {
+
+// Internal implementation detail -- do not call these.
+void protobuf_AddDesc_SchemaDef_2eproto();
+void protobuf_AssignDesc_SchemaDef_2eproto();
+void protobuf_ShutdownFile_SchemaDef_2eproto();
+
+
+enum ValueMode {
+ VALUE_VECTOR = 0,
+ RLE = 1,
+ DICT = 2
+};
+bool ValueMode_IsValid(int value);
+const ValueMode ValueMode_MIN = VALUE_VECTOR;
+const ValueMode ValueMode_MAX = DICT;
+const int ValueMode_ARRAYSIZE = ValueMode_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* ValueMode_descriptor();
+inline const ::std::string& ValueMode_Name(ValueMode value) {
+ return ::google::protobuf::internal::NameOfEnum(
+ ValueMode_descriptor(), value);
+}
+inline bool ValueMode_Parse(
+ const ::std::string& name, ValueMode* value) {
+ return ::google::protobuf::internal::ParseNamedEnum<ValueMode>(
+ ValueMode_descriptor(), name, value);
+}
+// ===================================================================
+
+
+// ===================================================================
+
+
+// ===================================================================
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+} // namespace exec
+
+#ifndef SWIG
+namespace google {
+namespace protobuf {
+
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::exec::ValueMode>() {
+ return ::exec::ValueMode_descriptor();
+}
+
+} // namespace google
+} // namespace protobuf
+#endif // SWIG
+
+// @@protoc_insertion_point(global_scope)
+
+#endif // PROTOBUF_SchemaDef_2eproto__INCLUDED
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/e1e5ea0e/contrib/native/client/src/protobuf/Types.pb.cc
----------------------------------------------------------------------
diff --git a/contrib/native/client/src/protobuf/Types.pb.cc b/contrib/native/client/src/protobuf/Types.pb.cc
new file mode 100644
index 0000000..c7fa2ea
--- /dev/null
+++ b/contrib/native/client/src/protobuf/Types.pb.cc
@@ -0,0 +1,611 @@
+// 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_[6] = {
+ 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_),
+ };
+ 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\"\225\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*\374\003\n\tMinorType\022\010\n\004LATE\020\000\022\007\n"
+ "\003MAP\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\tDECIMAL1"
+ "8\020\010\022\023\n\017DECIMAL28SPARSE\020\t\022\023\n\017DECIMAL38SPA"
+ "RSE\020\n\022\t\n\005MONEY\020\013\022\010\n\004DATE\020\014\022\010\n\004TIME\020\r\022\n\n\006"
+ "TIMETZ\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\003BIT\020\024\022\r\n\tFIXEDCHAR\020\025\022\017\n\013FIXED16CHAR\020\026\022"
+ "\017\n\013FIXEDBINARY\020\027\022\013\n\007VARCHAR\020\030\022\r\n\tVAR16CH"
+ "AR\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\016DECIMAL28DENS"
+ "E\020!\022\022\n\016DECIMAL38DENSE\020\"\022\016\n\nDM_UNKNOWN\020%\022"
+ "\020\n\014INTERVALYEAR\020&\022\017\n\013INTERVALDAY\020\'\022\010\n\004LI"
+ "ST\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.apach"
+ "e.drill.common.typesB\nTypeProtosH\001", 794);
+ ::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:
+ 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;
+#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;
+ }
+ ::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->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);
+ }
+
+ 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);
+ }
+
+ 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());
+ }
+
+ }
+ 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);
+ 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_);
+ 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)