4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
5 #include "replication_options.pb.h"
9 #include <google/protobuf/stubs/common.h>
10 #include <google/protobuf/stubs/once.h>
11 #include <google/protobuf/io/coded_stream.h>
12 #include <google/protobuf/wire_format_lite_inl.h>
13 #include <google/protobuf/descriptor.h>
14 #include <google/protobuf/generated_message_reflection.h>
15 #include <google/protobuf/reflection_ops.h>
16 #include <google/protobuf/wire_format.h>
24 const ::google::protobuf::Descriptor* ReplicationOptions_descriptor_ = NULL;
25 const ::google::protobuf::internal::GeneratedMessageReflection*
26 ReplicationOptions_reflection_ = NULL;
31 void protobuf_AssignDesc_replication_5foptions_2eproto() {
32 protobuf_AddDesc_replication_5foptions_2eproto();
33 const ::google::protobuf::FileDescriptor* file =
34 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
35 "replication_options.proto");
36 GOOGLE_CHECK(file != NULL);
37 ReplicationOptions_descriptor_ = file->message_type(0);
38 static const int ReplicationOptions_offsets_[1] = {
39 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReplicationOptions, is_replicated_),
41 ReplicationOptions_reflection_ =
42 new ::google::protobuf::internal::GeneratedMessageReflection(
43 ReplicationOptions_descriptor_,
44 ReplicationOptions::default_instance_,
45 ReplicationOptions_offsets_,
46 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReplicationOptions, _has_bits_[0]),
47 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReplicationOptions, _unknown_fields_),
49 ::google::protobuf::DescriptorPool::generated_pool(),
50 ::google::protobuf::MessageFactory::generated_factory(),
51 sizeof(ReplicationOptions));
56 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
57 inline void protobuf_AssignDescriptorsOnce() {
58 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
59 &protobuf_AssignDesc_replication_5foptions_2eproto);
62 void protobuf_RegisterTypes(const ::std::string&) {
63 protobuf_AssignDescriptorsOnce();
64 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
65 ReplicationOptions_descriptor_, &ReplicationOptions::default_instance());
70 void protobuf_ShutdownFile_replication_5foptions_2eproto() {
71 delete ReplicationOptions::default_instance_;
72 delete ReplicationOptions_reflection_;
75 void protobuf_AddDesc_replication_5foptions_2eproto() {
76 static bool already_here =
false;
77 if (already_here)
return;
79 GOOGLE_PROTOBUF_VERIFY_VERSION;
81 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
82 "\n\031replication_options.proto\022\020drizzled.me"
83 "ssage\"+\n\022ReplicationOptions\022\025\n\ris_replic"
84 "ated\030\002 \001(\010B%\n\024org.drizzle.messagesB\013Repl"
86 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
87 "replication_options.proto", &protobuf_RegisterTypes);
88 ReplicationOptions::default_instance_ =
new ReplicationOptions();
89 ReplicationOptions::default_instance_->InitAsDefaultInstance();
90 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_replication_5foptions_2eproto);
96 protobuf_AddDesc_replication_5foptions_2eproto();
98 } static_descriptor_initializer_replication_5foptions_2eproto_;
103 const int ReplicationOptions::kIsReplicatedFieldNumber;
106 ReplicationOptions::ReplicationOptions()
107 : ::
google::protobuf::Message() {
112 void ReplicationOptions::InitAsDefaultInstance() {
115 ReplicationOptions::ReplicationOptions(
const ReplicationOptions& from)
116 : ::
google::protobuf::Message() {
122 void ReplicationOptions::SharedCtor() {
124 is_replicated_ =
false;
125 ::memset(_has_bits_, 0,
sizeof(_has_bits_));
128 ReplicationOptions::~ReplicationOptions() {
133 void ReplicationOptions::SharedDtor() {
134 if (
this != default_instance_) {
138 void ReplicationOptions::SetCachedSize(
int size)
const {
139 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
140 _cached_size_ = size;
141 GOOGLE_SAFE_CONCURRENT_WRITES_END();
143 const ::google::protobuf::Descriptor* ReplicationOptions::descriptor() {
144 protobuf_AssignDescriptorsOnce();
145 return ReplicationOptions_descriptor_;
148 const ReplicationOptions& ReplicationOptions::default_instance() {
149 if (default_instance_ == NULL) protobuf_AddDesc_replication_5foptions_2eproto();
150 return *default_instance_;
153 ReplicationOptions* ReplicationOptions::default_instance_ = NULL;
155 ReplicationOptions* ReplicationOptions::New()
const {
156 return new ReplicationOptions;
159 void ReplicationOptions::Clear() {
160 is_replicated_ =
false;
161 ::memset(_has_bits_, 0,
sizeof(_has_bits_));
162 mutable_unknown_fields()->Clear();
165 bool ReplicationOptions::MergePartialFromCodedStream(
166 ::google::protobuf::io::CodedInputStream* input) {
167 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
168 ::google::protobuf::uint32 tag;
171 ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
173 if (!p.second)
goto handle_unusual;
174 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
178 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
179 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
180 input, &is_replicated_)));
181 set_has_is_replicated();
185 if (input->ExpectAtEnd())
goto success;
192 ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
193 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
196 DO_(::google::protobuf::internal::WireFormat::SkipField(
197 input, tag, mutable_unknown_fields()));
211 void ReplicationOptions::SerializeWithCachedSizes(
212 ::google::protobuf::io::CodedOutputStream* output)
const {
215 if (has_is_replicated()) {
216 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->is_replicated(), output);
219 if (!unknown_fields().empty()) {
220 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
221 unknown_fields(), output);
226 ::google::protobuf::uint8* ReplicationOptions::SerializeWithCachedSizesToArray(
227 ::google::protobuf::uint8* target)
const {
230 if (has_is_replicated()) {
231 target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->is_replicated(), target);
234 if (!unknown_fields().empty()) {
235 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
236 unknown_fields(), target);
242 int ReplicationOptions::ByteSize()
const {
245 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
247 if (has_is_replicated()) {
252 if (!unknown_fields().empty()) {
254 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
257 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
258 _cached_size_ = total_size;
259 GOOGLE_SAFE_CONCURRENT_WRITES_END();
263 void ReplicationOptions::MergeFrom(const ::google::protobuf::Message& from) {
264 GOOGLE_CHECK_NE(&from,
this);
265 const ReplicationOptions* source =
266 ::google::protobuf::internal::dynamic_cast_if_available<const ReplicationOptions*>(
268 if (source == NULL) {
269 ::google::protobuf::internal::ReflectionOps::Merge(from,
this);
275 void ReplicationOptions::MergeFrom(
const ReplicationOptions& from) {
276 GOOGLE_CHECK_NE(&from,
this);
277 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
278 if (from.has_is_replicated()) {
279 set_is_replicated(from.is_replicated());
282 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
285 void ReplicationOptions::CopyFrom(const ::google::protobuf::Message& from) {
286 if (&from ==
this)
return;
291 void ReplicationOptions::CopyFrom(
const ReplicationOptions& from) {
292 if (&from ==
this)
return;
297 bool ReplicationOptions::IsInitialized()
const {
302 void ReplicationOptions::Swap(ReplicationOptions* other) {
304 std::swap(is_replicated_, other->is_replicated_);
305 std::swap(_has_bits_[0], other->_has_bits_[0]);
306 _unknown_fields_.Swap(&other->_unknown_fields_);
307 std::swap(_cached_size_, other->_cached_size_);
311 ::google::protobuf::Metadata ReplicationOptions::GetMetadata()
const {
312 protobuf_AssignDescriptorsOnce();
313 ::google::protobuf::Metadata metadata;
314 metadata.descriptor = ReplicationOptions_descriptor_;
315 metadata.reflection = ReplicationOptions_reflection_;
TODO: Rename this file - func.h is stupid.