/thirdparty/breakpad/third_party/protobuf/protobuf/src/google/protobuf/compiler/plugin.pb.cc

http://github.com/tomahawk-player/tomahawk · C++ · 1082 lines · 908 code · 134 blank · 40 comment · 157 complexity · 330f6ba613d2ae412d5f6c0ece12be10 MD5 · raw file

  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
  3. #include "google/protobuf/compiler/plugin.pb.h"
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/once.h>
  6. #include <google/protobuf/io/coded_stream.h>
  7. #include <google/protobuf/wire_format_lite_inl.h>
  8. #include <google/protobuf/descriptor.h>
  9. #include <google/protobuf/reflection_ops.h>
  10. #include <google/protobuf/wire_format.h>
  11. // @@protoc_insertion_point(includes)
  12. namespace google {
  13. namespace protobuf {
  14. namespace compiler {
  15. namespace {
  16. const ::google::protobuf::Descriptor* CodeGeneratorRequest_descriptor_ = NULL;
  17. const ::google::protobuf::internal::GeneratedMessageReflection*
  18. CodeGeneratorRequest_reflection_ = NULL;
  19. const ::google::protobuf::Descriptor* CodeGeneratorResponse_descriptor_ = NULL;
  20. const ::google::protobuf::internal::GeneratedMessageReflection*
  21. CodeGeneratorResponse_reflection_ = NULL;
  22. const ::google::protobuf::Descriptor* CodeGeneratorResponse_File_descriptor_ = NULL;
  23. const ::google::protobuf::internal::GeneratedMessageReflection*
  24. CodeGeneratorResponse_File_reflection_ = NULL;
  25. } // namespace
  26. void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
  27. protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
  28. const ::google::protobuf::FileDescriptor* file =
  29. ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
  30. "google/protobuf/compiler/plugin.proto");
  31. GOOGLE_CHECK(file != NULL);
  32. CodeGeneratorRequest_descriptor_ = file->message_type(0);
  33. static const int CodeGeneratorRequest_offsets_[3] = {
  34. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, file_to_generate_),
  35. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, parameter_),
  36. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, proto_file_),
  37. };
  38. CodeGeneratorRequest_reflection_ =
  39. new ::google::protobuf::internal::GeneratedMessageReflection(
  40. CodeGeneratorRequest_descriptor_,
  41. CodeGeneratorRequest::default_instance_,
  42. CodeGeneratorRequest_offsets_,
  43. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _has_bits_[0]),
  44. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorRequest, _unknown_fields_),
  45. -1,
  46. ::google::protobuf::DescriptorPool::generated_pool(),
  47. ::google::protobuf::MessageFactory::generated_factory(),
  48. sizeof(CodeGeneratorRequest));
  49. CodeGeneratorResponse_descriptor_ = file->message_type(1);
  50. static const int CodeGeneratorResponse_offsets_[2] = {
  51. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, error_),
  52. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, file_),
  53. };
  54. CodeGeneratorResponse_reflection_ =
  55. new ::google::protobuf::internal::GeneratedMessageReflection(
  56. CodeGeneratorResponse_descriptor_,
  57. CodeGeneratorResponse::default_instance_,
  58. CodeGeneratorResponse_offsets_,
  59. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _has_bits_[0]),
  60. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse, _unknown_fields_),
  61. -1,
  62. ::google::protobuf::DescriptorPool::generated_pool(),
  63. ::google::protobuf::MessageFactory::generated_factory(),
  64. sizeof(CodeGeneratorResponse));
  65. CodeGeneratorResponse_File_descriptor_ = CodeGeneratorResponse_descriptor_->nested_type(0);
  66. static const int CodeGeneratorResponse_File_offsets_[3] = {
  67. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, name_),
  68. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, insertion_point_),
  69. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, content_),
  70. };
  71. CodeGeneratorResponse_File_reflection_ =
  72. new ::google::protobuf::internal::GeneratedMessageReflection(
  73. CodeGeneratorResponse_File_descriptor_,
  74. CodeGeneratorResponse_File::default_instance_,
  75. CodeGeneratorResponse_File_offsets_,
  76. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _has_bits_[0]),
  77. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CodeGeneratorResponse_File, _unknown_fields_),
  78. -1,
  79. ::google::protobuf::DescriptorPool::generated_pool(),
  80. ::google::protobuf::MessageFactory::generated_factory(),
  81. sizeof(CodeGeneratorResponse_File));
  82. }
  83. namespace {
  84. GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
  85. inline void protobuf_AssignDescriptorsOnce() {
  86. ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
  87. &protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto);
  88. }
  89. void protobuf_RegisterTypes(const ::std::string&) {
  90. protobuf_AssignDescriptorsOnce();
  91. ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
  92. CodeGeneratorRequest_descriptor_, &CodeGeneratorRequest::default_instance());
  93. ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
  94. CodeGeneratorResponse_descriptor_, &CodeGeneratorResponse::default_instance());
  95. ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
  96. CodeGeneratorResponse_File_descriptor_, &CodeGeneratorResponse_File::default_instance());
  97. }
  98. } // namespace
  99. void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
  100. delete CodeGeneratorRequest::default_instance_;
  101. delete CodeGeneratorRequest_reflection_;
  102. delete CodeGeneratorResponse::default_instance_;
  103. delete CodeGeneratorResponse_reflection_;
  104. delete CodeGeneratorResponse_File::default_instance_;
  105. delete CodeGeneratorResponse_File_reflection_;
  106. }
  107. void protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
  108. static bool already_here = false;
  109. if (already_here) return;
  110. already_here = true;
  111. GOOGLE_PROTOBUF_VERIFY_VERSION;
  112. ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
  113. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  114. "\n%google/protobuf/compiler/plugin.proto\022"
  115. "\030google.protobuf.compiler\032 google/protob"
  116. "uf/descriptor.proto\"}\n\024CodeGeneratorRequ"
  117. "est\022\030\n\020file_to_generate\030\001 \003(\t\022\021\n\tparamet"
  118. "er\030\002 \001(\t\0228\n\nproto_file\030\017 \003(\0132$.google.pr"
  119. "otobuf.FileDescriptorProto\"\252\001\n\025CodeGener"
  120. "atorResponse\022\r\n\005error\030\001 \001(\t\022B\n\004file\030\017 \003("
  121. "\01324.google.protobuf.compiler.CodeGenerat"
  122. "orResponse.File\032>\n\004File\022\014\n\004name\030\001 \001(\t\022\027\n"
  123. "\017insertion_point\030\002 \001(\t\022\017\n\007content\030\017 \001(\t", 399);
  124. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  125. "google/protobuf/compiler/plugin.proto", &protobuf_RegisterTypes);
  126. CodeGeneratorRequest::default_instance_ = new CodeGeneratorRequest();
  127. CodeGeneratorResponse::default_instance_ = new CodeGeneratorResponse();
  128. CodeGeneratorResponse_File::default_instance_ = new CodeGeneratorResponse_File();
  129. CodeGeneratorRequest::default_instance_->InitAsDefaultInstance();
  130. CodeGeneratorResponse::default_instance_->InitAsDefaultInstance();
  131. CodeGeneratorResponse_File::default_instance_->InitAsDefaultInstance();
  132. ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto);
  133. }
  134. // Force AddDescriptors() to be called at static initialization time.
  135. struct StaticDescriptorInitializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto {
  136. StaticDescriptorInitializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto() {
  137. protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
  138. }
  139. } static_descriptor_initializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto_;
  140. // ===================================================================
  141. #ifndef _MSC_VER
  142. const int CodeGeneratorRequest::kFileToGenerateFieldNumber;
  143. const int CodeGeneratorRequest::kParameterFieldNumber;
  144. const int CodeGeneratorRequest::kProtoFileFieldNumber;
  145. #endif // !_MSC_VER
  146. CodeGeneratorRequest::CodeGeneratorRequest()
  147. : ::google::protobuf::Message() {
  148. SharedCtor();
  149. }
  150. void CodeGeneratorRequest::InitAsDefaultInstance() {
  151. }
  152. CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
  153. : ::google::protobuf::Message() {
  154. SharedCtor();
  155. MergeFrom(from);
  156. }
  157. void CodeGeneratorRequest::SharedCtor() {
  158. _cached_size_ = 0;
  159. parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  160. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  161. }
  162. CodeGeneratorRequest::~CodeGeneratorRequest() {
  163. SharedDtor();
  164. }
  165. void CodeGeneratorRequest::SharedDtor() {
  166. if (parameter_ != &::google::protobuf::internal::kEmptyString) {
  167. delete parameter_;
  168. }
  169. if (this != default_instance_) {
  170. }
  171. }
  172. void CodeGeneratorRequest::SetCachedSize(int size) const {
  173. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  174. _cached_size_ = size;
  175. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  176. }
  177. const ::google::protobuf::Descriptor* CodeGeneratorRequest::descriptor() {
  178. protobuf_AssignDescriptorsOnce();
  179. return CodeGeneratorRequest_descriptor_;
  180. }
  181. const CodeGeneratorRequest& CodeGeneratorRequest::default_instance() {
  182. if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); return *default_instance_;
  183. }
  184. CodeGeneratorRequest* CodeGeneratorRequest::default_instance_ = NULL;
  185. CodeGeneratorRequest* CodeGeneratorRequest::New() const {
  186. return new CodeGeneratorRequest;
  187. }
  188. void CodeGeneratorRequest::Clear() {
  189. if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
  190. if (has_parameter()) {
  191. if (parameter_ != &::google::protobuf::internal::kEmptyString) {
  192. parameter_->clear();
  193. }
  194. }
  195. }
  196. file_to_generate_.Clear();
  197. proto_file_.Clear();
  198. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  199. mutable_unknown_fields()->Clear();
  200. }
  201. bool CodeGeneratorRequest::MergePartialFromCodedStream(
  202. ::google::protobuf::io::CodedInputStream* input) {
  203. #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  204. ::google::protobuf::uint32 tag;
  205. while ((tag = input->ReadTag()) != 0) {
  206. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  207. // repeated string file_to_generate = 1;
  208. case 1: {
  209. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  210. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  211. parse_file_to_generate:
  212. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  213. input, this->add_file_to_generate()));
  214. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  215. this->file_to_generate(0).data(), this->file_to_generate(0).length(),
  216. ::google::protobuf::internal::WireFormat::PARSE);
  217. } else {
  218. goto handle_uninterpreted;
  219. }
  220. if (input->ExpectTag(10)) goto parse_file_to_generate;
  221. if (input->ExpectTag(18)) goto parse_parameter;
  222. break;
  223. }
  224. // optional string parameter = 2;
  225. case 2: {
  226. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  227. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  228. parse_parameter:
  229. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  230. input, this->mutable_parameter()));
  231. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  232. this->parameter().data(), this->parameter().length(),
  233. ::google::protobuf::internal::WireFormat::PARSE);
  234. } else {
  235. goto handle_uninterpreted;
  236. }
  237. if (input->ExpectTag(122)) goto parse_proto_file;
  238. break;
  239. }
  240. // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
  241. case 15: {
  242. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  243. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  244. parse_proto_file:
  245. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  246. input, add_proto_file()));
  247. } else {
  248. goto handle_uninterpreted;
  249. }
  250. if (input->ExpectTag(122)) goto parse_proto_file;
  251. if (input->ExpectAtEnd()) return true;
  252. break;
  253. }
  254. default: {
  255. handle_uninterpreted:
  256. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  257. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  258. return true;
  259. }
  260. DO_(::google::protobuf::internal::WireFormat::SkipField(
  261. input, tag, mutable_unknown_fields()));
  262. break;
  263. }
  264. }
  265. }
  266. return true;
  267. #undef DO_
  268. }
  269. void CodeGeneratorRequest::SerializeWithCachedSizes(
  270. ::google::protobuf::io::CodedOutputStream* output) const {
  271. // repeated string file_to_generate = 1;
  272. for (int i = 0; i < this->file_to_generate_size(); i++) {
  273. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  274. this->file_to_generate(i).data(), this->file_to_generate(i).length(),
  275. ::google::protobuf::internal::WireFormat::SERIALIZE);
  276. ::google::protobuf::internal::WireFormatLite::WriteString(
  277. 1, this->file_to_generate(i), output);
  278. }
  279. // optional string parameter = 2;
  280. if (has_parameter()) {
  281. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  282. this->parameter().data(), this->parameter().length(),
  283. ::google::protobuf::internal::WireFormat::SERIALIZE);
  284. ::google::protobuf::internal::WireFormatLite::WriteString(
  285. 2, this->parameter(), output);
  286. }
  287. // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
  288. for (int i = 0; i < this->proto_file_size(); i++) {
  289. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  290. 15, this->proto_file(i), output);
  291. }
  292. if (!unknown_fields().empty()) {
  293. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  294. unknown_fields(), output);
  295. }
  296. }
  297. ::google::protobuf::uint8* CodeGeneratorRequest::SerializeWithCachedSizesToArray(
  298. ::google::protobuf::uint8* target) const {
  299. // repeated string file_to_generate = 1;
  300. for (int i = 0; i < this->file_to_generate_size(); i++) {
  301. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  302. this->file_to_generate(i).data(), this->file_to_generate(i).length(),
  303. ::google::protobuf::internal::WireFormat::SERIALIZE);
  304. target = ::google::protobuf::internal::WireFormatLite::
  305. WriteStringToArray(1, this->file_to_generate(i), target);
  306. }
  307. // optional string parameter = 2;
  308. if (has_parameter()) {
  309. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  310. this->parameter().data(), this->parameter().length(),
  311. ::google::protobuf::internal::WireFormat::SERIALIZE);
  312. target =
  313. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  314. 2, this->parameter(), target);
  315. }
  316. // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
  317. for (int i = 0; i < this->proto_file_size(); i++) {
  318. target = ::google::protobuf::internal::WireFormatLite::
  319. WriteMessageNoVirtualToArray(
  320. 15, this->proto_file(i), target);
  321. }
  322. if (!unknown_fields().empty()) {
  323. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  324. unknown_fields(), target);
  325. }
  326. return target;
  327. }
  328. int CodeGeneratorRequest::ByteSize() const {
  329. int total_size = 0;
  330. if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
  331. // optional string parameter = 2;
  332. if (has_parameter()) {
  333. total_size += 1 +
  334. ::google::protobuf::internal::WireFormatLite::StringSize(
  335. this->parameter());
  336. }
  337. }
  338. // repeated string file_to_generate = 1;
  339. total_size += 1 * this->file_to_generate_size();
  340. for (int i = 0; i < this->file_to_generate_size(); i++) {
  341. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  342. this->file_to_generate(i));
  343. }
  344. // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
  345. total_size += 1 * this->proto_file_size();
  346. for (int i = 0; i < this->proto_file_size(); i++) {
  347. total_size +=
  348. ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
  349. this->proto_file(i));
  350. }
  351. if (!unknown_fields().empty()) {
  352. total_size +=
  353. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  354. unknown_fields());
  355. }
  356. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  357. _cached_size_ = total_size;
  358. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  359. return total_size;
  360. }
  361. void CodeGeneratorRequest::MergeFrom(const ::google::protobuf::Message& from) {
  362. GOOGLE_CHECK_NE(&from, this);
  363. const CodeGeneratorRequest* source =
  364. ::google::protobuf::internal::dynamic_cast_if_available<const CodeGeneratorRequest*>(
  365. &from);
  366. if (source == NULL) {
  367. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  368. } else {
  369. MergeFrom(*source);
  370. }
  371. }
  372. void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) {
  373. GOOGLE_CHECK_NE(&from, this);
  374. file_to_generate_.MergeFrom(from.file_to_generate_);
  375. proto_file_.MergeFrom(from.proto_file_);
  376. if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
  377. if (from.has_parameter()) {
  378. set_parameter(from.parameter());
  379. }
  380. }
  381. mutable_unknown_fields()->MergeFrom(from.unknown_fields());
  382. }
  383. void CodeGeneratorRequest::CopyFrom(const ::google::protobuf::Message& from) {
  384. if (&from == this) return;
  385. Clear();
  386. MergeFrom(from);
  387. }
  388. void CodeGeneratorRequest::CopyFrom(const CodeGeneratorRequest& from) {
  389. if (&from == this) return;
  390. Clear();
  391. MergeFrom(from);
  392. }
  393. bool CodeGeneratorRequest::IsInitialized() const {
  394. for (int i = 0; i < proto_file_size(); i++) {
  395. if (!this->proto_file(i).IsInitialized()) return false;
  396. }
  397. return true;
  398. }
  399. void CodeGeneratorRequest::Swap(CodeGeneratorRequest* other) {
  400. if (other != this) {
  401. file_to_generate_.Swap(&other->file_to_generate_);
  402. std::swap(parameter_, other->parameter_);
  403. proto_file_.Swap(&other->proto_file_);
  404. std::swap(_has_bits_[0], other->_has_bits_[0]);
  405. _unknown_fields_.Swap(&other->_unknown_fields_);
  406. std::swap(_cached_size_, other->_cached_size_);
  407. }
  408. }
  409. ::google::protobuf::Metadata CodeGeneratorRequest::GetMetadata() const {
  410. protobuf_AssignDescriptorsOnce();
  411. ::google::protobuf::Metadata metadata;
  412. metadata.descriptor = CodeGeneratorRequest_descriptor_;
  413. metadata.reflection = CodeGeneratorRequest_reflection_;
  414. return metadata;
  415. }
  416. // ===================================================================
  417. #ifndef _MSC_VER
  418. const int CodeGeneratorResponse_File::kNameFieldNumber;
  419. const int CodeGeneratorResponse_File::kInsertionPointFieldNumber;
  420. const int CodeGeneratorResponse_File::kContentFieldNumber;
  421. #endif // !_MSC_VER
  422. CodeGeneratorResponse_File::CodeGeneratorResponse_File()
  423. : ::google::protobuf::Message() {
  424. SharedCtor();
  425. }
  426. void CodeGeneratorResponse_File::InitAsDefaultInstance() {
  427. }
  428. CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from)
  429. : ::google::protobuf::Message() {
  430. SharedCtor();
  431. MergeFrom(from);
  432. }
  433. void CodeGeneratorResponse_File::SharedCtor() {
  434. _cached_size_ = 0;
  435. name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  436. insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  437. content_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  438. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  439. }
  440. CodeGeneratorResponse_File::~CodeGeneratorResponse_File() {
  441. SharedDtor();
  442. }
  443. void CodeGeneratorResponse_File::SharedDtor() {
  444. if (name_ != &::google::protobuf::internal::kEmptyString) {
  445. delete name_;
  446. }
  447. if (insertion_point_ != &::google::protobuf::internal::kEmptyString) {
  448. delete insertion_point_;
  449. }
  450. if (content_ != &::google::protobuf::internal::kEmptyString) {
  451. delete content_;
  452. }
  453. if (this != default_instance_) {
  454. }
  455. }
  456. void CodeGeneratorResponse_File::SetCachedSize(int size) const {
  457. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  458. _cached_size_ = size;
  459. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  460. }
  461. const ::google::protobuf::Descriptor* CodeGeneratorResponse_File::descriptor() {
  462. protobuf_AssignDescriptorsOnce();
  463. return CodeGeneratorResponse_File_descriptor_;
  464. }
  465. const CodeGeneratorResponse_File& CodeGeneratorResponse_File::default_instance() {
  466. if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); return *default_instance_;
  467. }
  468. CodeGeneratorResponse_File* CodeGeneratorResponse_File::default_instance_ = NULL;
  469. CodeGeneratorResponse_File* CodeGeneratorResponse_File::New() const {
  470. return new CodeGeneratorResponse_File;
  471. }
  472. void CodeGeneratorResponse_File::Clear() {
  473. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  474. if (has_name()) {
  475. if (name_ != &::google::protobuf::internal::kEmptyString) {
  476. name_->clear();
  477. }
  478. }
  479. if (has_insertion_point()) {
  480. if (insertion_point_ != &::google::protobuf::internal::kEmptyString) {
  481. insertion_point_->clear();
  482. }
  483. }
  484. if (has_content()) {
  485. if (content_ != &::google::protobuf::internal::kEmptyString) {
  486. content_->clear();
  487. }
  488. }
  489. }
  490. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  491. mutable_unknown_fields()->Clear();
  492. }
  493. bool CodeGeneratorResponse_File::MergePartialFromCodedStream(
  494. ::google::protobuf::io::CodedInputStream* input) {
  495. #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  496. ::google::protobuf::uint32 tag;
  497. while ((tag = input->ReadTag()) != 0) {
  498. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  499. // optional string name = 1;
  500. case 1: {
  501. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  502. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  503. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  504. input, this->mutable_name()));
  505. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  506. this->name().data(), this->name().length(),
  507. ::google::protobuf::internal::WireFormat::PARSE);
  508. } else {
  509. goto handle_uninterpreted;
  510. }
  511. if (input->ExpectTag(18)) goto parse_insertion_point;
  512. break;
  513. }
  514. // optional string insertion_point = 2;
  515. case 2: {
  516. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  517. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  518. parse_insertion_point:
  519. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  520. input, this->mutable_insertion_point()));
  521. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  522. this->insertion_point().data(), this->insertion_point().length(),
  523. ::google::protobuf::internal::WireFormat::PARSE);
  524. } else {
  525. goto handle_uninterpreted;
  526. }
  527. if (input->ExpectTag(122)) goto parse_content;
  528. break;
  529. }
  530. // optional string content = 15;
  531. case 15: {
  532. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  533. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  534. parse_content:
  535. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  536. input, this->mutable_content()));
  537. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  538. this->content().data(), this->content().length(),
  539. ::google::protobuf::internal::WireFormat::PARSE);
  540. } else {
  541. goto handle_uninterpreted;
  542. }
  543. if (input->ExpectAtEnd()) return true;
  544. break;
  545. }
  546. default: {
  547. handle_uninterpreted:
  548. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  549. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  550. return true;
  551. }
  552. DO_(::google::protobuf::internal::WireFormat::SkipField(
  553. input, tag, mutable_unknown_fields()));
  554. break;
  555. }
  556. }
  557. }
  558. return true;
  559. #undef DO_
  560. }
  561. void CodeGeneratorResponse_File::SerializeWithCachedSizes(
  562. ::google::protobuf::io::CodedOutputStream* output) const {
  563. // optional string name = 1;
  564. if (has_name()) {
  565. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  566. this->name().data(), this->name().length(),
  567. ::google::protobuf::internal::WireFormat::SERIALIZE);
  568. ::google::protobuf::internal::WireFormatLite::WriteString(
  569. 1, this->name(), output);
  570. }
  571. // optional string insertion_point = 2;
  572. if (has_insertion_point()) {
  573. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  574. this->insertion_point().data(), this->insertion_point().length(),
  575. ::google::protobuf::internal::WireFormat::SERIALIZE);
  576. ::google::protobuf::internal::WireFormatLite::WriteString(
  577. 2, this->insertion_point(), output);
  578. }
  579. // optional string content = 15;
  580. if (has_content()) {
  581. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  582. this->content().data(), this->content().length(),
  583. ::google::protobuf::internal::WireFormat::SERIALIZE);
  584. ::google::protobuf::internal::WireFormatLite::WriteString(
  585. 15, this->content(), output);
  586. }
  587. if (!unknown_fields().empty()) {
  588. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  589. unknown_fields(), output);
  590. }
  591. }
  592. ::google::protobuf::uint8* CodeGeneratorResponse_File::SerializeWithCachedSizesToArray(
  593. ::google::protobuf::uint8* target) const {
  594. // optional string name = 1;
  595. if (has_name()) {
  596. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  597. this->name().data(), this->name().length(),
  598. ::google::protobuf::internal::WireFormat::SERIALIZE);
  599. target =
  600. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  601. 1, this->name(), target);
  602. }
  603. // optional string insertion_point = 2;
  604. if (has_insertion_point()) {
  605. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  606. this->insertion_point().data(), this->insertion_point().length(),
  607. ::google::protobuf::internal::WireFormat::SERIALIZE);
  608. target =
  609. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  610. 2, this->insertion_point(), target);
  611. }
  612. // optional string content = 15;
  613. if (has_content()) {
  614. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  615. this->content().data(), this->content().length(),
  616. ::google::protobuf::internal::WireFormat::SERIALIZE);
  617. target =
  618. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  619. 15, this->content(), target);
  620. }
  621. if (!unknown_fields().empty()) {
  622. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  623. unknown_fields(), target);
  624. }
  625. return target;
  626. }
  627. int CodeGeneratorResponse_File::ByteSize() const {
  628. int total_size = 0;
  629. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  630. // optional string name = 1;
  631. if (has_name()) {
  632. total_size += 1 +
  633. ::google::protobuf::internal::WireFormatLite::StringSize(
  634. this->name());
  635. }
  636. // optional string insertion_point = 2;
  637. if (has_insertion_point()) {
  638. total_size += 1 +
  639. ::google::protobuf::internal::WireFormatLite::StringSize(
  640. this->insertion_point());
  641. }
  642. // optional string content = 15;
  643. if (has_content()) {
  644. total_size += 1 +
  645. ::google::protobuf::internal::WireFormatLite::StringSize(
  646. this->content());
  647. }
  648. }
  649. if (!unknown_fields().empty()) {
  650. total_size +=
  651. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  652. unknown_fields());
  653. }
  654. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  655. _cached_size_ = total_size;
  656. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  657. return total_size;
  658. }
  659. void CodeGeneratorResponse_File::MergeFrom(const ::google::protobuf::Message& from) {
  660. GOOGLE_CHECK_NE(&from, this);
  661. const CodeGeneratorResponse_File* source =
  662. ::google::protobuf::internal::dynamic_cast_if_available<const CodeGeneratorResponse_File*>(
  663. &from);
  664. if (source == NULL) {
  665. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  666. } else {
  667. MergeFrom(*source);
  668. }
  669. }
  670. void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& from) {
  671. GOOGLE_CHECK_NE(&from, this);
  672. if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  673. if (from.has_name()) {
  674. set_name(from.name());
  675. }
  676. if (from.has_insertion_point()) {
  677. set_insertion_point(from.insertion_point());
  678. }
  679. if (from.has_content()) {
  680. set_content(from.content());
  681. }
  682. }
  683. mutable_unknown_fields()->MergeFrom(from.unknown_fields());
  684. }
  685. void CodeGeneratorResponse_File::CopyFrom(const ::google::protobuf::Message& from) {
  686. if (&from == this) return;
  687. Clear();
  688. MergeFrom(from);
  689. }
  690. void CodeGeneratorResponse_File::CopyFrom(const CodeGeneratorResponse_File& from) {
  691. if (&from == this) return;
  692. Clear();
  693. MergeFrom(from);
  694. }
  695. bool CodeGeneratorResponse_File::IsInitialized() const {
  696. return true;
  697. }
  698. void CodeGeneratorResponse_File::Swap(CodeGeneratorResponse_File* other) {
  699. if (other != this) {
  700. std::swap(name_, other->name_);
  701. std::swap(insertion_point_, other->insertion_point_);
  702. std::swap(content_, other->content_);
  703. std::swap(_has_bits_[0], other->_has_bits_[0]);
  704. _unknown_fields_.Swap(&other->_unknown_fields_);
  705. std::swap(_cached_size_, other->_cached_size_);
  706. }
  707. }
  708. ::google::protobuf::Metadata CodeGeneratorResponse_File::GetMetadata() const {
  709. protobuf_AssignDescriptorsOnce();
  710. ::google::protobuf::Metadata metadata;
  711. metadata.descriptor = CodeGeneratorResponse_File_descriptor_;
  712. metadata.reflection = CodeGeneratorResponse_File_reflection_;
  713. return metadata;
  714. }
  715. // -------------------------------------------------------------------
  716. #ifndef _MSC_VER
  717. const int CodeGeneratorResponse::kErrorFieldNumber;
  718. const int CodeGeneratorResponse::kFileFieldNumber;
  719. #endif // !_MSC_VER
  720. CodeGeneratorResponse::CodeGeneratorResponse()
  721. : ::google::protobuf::Message() {
  722. SharedCtor();
  723. }
  724. void CodeGeneratorResponse::InitAsDefaultInstance() {
  725. }
  726. CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from)
  727. : ::google::protobuf::Message() {
  728. SharedCtor();
  729. MergeFrom(from);
  730. }
  731. void CodeGeneratorResponse::SharedCtor() {
  732. _cached_size_ = 0;
  733. error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  734. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  735. }
  736. CodeGeneratorResponse::~CodeGeneratorResponse() {
  737. SharedDtor();
  738. }
  739. void CodeGeneratorResponse::SharedDtor() {
  740. if (error_ != &::google::protobuf::internal::kEmptyString) {
  741. delete error_;
  742. }
  743. if (this != default_instance_) {
  744. }
  745. }
  746. void CodeGeneratorResponse::SetCachedSize(int size) const {
  747. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  748. _cached_size_ = size;
  749. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  750. }
  751. const ::google::protobuf::Descriptor* CodeGeneratorResponse::descriptor() {
  752. protobuf_AssignDescriptorsOnce();
  753. return CodeGeneratorResponse_descriptor_;
  754. }
  755. const CodeGeneratorResponse& CodeGeneratorResponse::default_instance() {
  756. if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto(); return *default_instance_;
  757. }
  758. CodeGeneratorResponse* CodeGeneratorResponse::default_instance_ = NULL;
  759. CodeGeneratorResponse* CodeGeneratorResponse::New() const {
  760. return new CodeGeneratorResponse;
  761. }
  762. void CodeGeneratorResponse::Clear() {
  763. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  764. if (has_error()) {
  765. if (error_ != &::google::protobuf::internal::kEmptyString) {
  766. error_->clear();
  767. }
  768. }
  769. }
  770. file_.Clear();
  771. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  772. mutable_unknown_fields()->Clear();
  773. }
  774. bool CodeGeneratorResponse::MergePartialFromCodedStream(
  775. ::google::protobuf::io::CodedInputStream* input) {
  776. #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  777. ::google::protobuf::uint32 tag;
  778. while ((tag = input->ReadTag()) != 0) {
  779. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  780. // optional string error = 1;
  781. case 1: {
  782. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  783. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  784. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  785. input, this->mutable_error()));
  786. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  787. this->error().data(), this->error().length(),
  788. ::google::protobuf::internal::WireFormat::PARSE);
  789. } else {
  790. goto handle_uninterpreted;
  791. }
  792. if (input->ExpectTag(122)) goto parse_file;
  793. break;
  794. }
  795. // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
  796. case 15: {
  797. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  798. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  799. parse_file:
  800. DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
  801. input, add_file()));
  802. } else {
  803. goto handle_uninterpreted;
  804. }
  805. if (input->ExpectTag(122)) goto parse_file;
  806. if (input->ExpectAtEnd()) return true;
  807. break;
  808. }
  809. default: {
  810. handle_uninterpreted:
  811. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  812. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  813. return true;
  814. }
  815. DO_(::google::protobuf::internal::WireFormat::SkipField(
  816. input, tag, mutable_unknown_fields()));
  817. break;
  818. }
  819. }
  820. }
  821. return true;
  822. #undef DO_
  823. }
  824. void CodeGeneratorResponse::SerializeWithCachedSizes(
  825. ::google::protobuf::io::CodedOutputStream* output) const {
  826. // optional string error = 1;
  827. if (has_error()) {
  828. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  829. this->error().data(), this->error().length(),
  830. ::google::protobuf::internal::WireFormat::SERIALIZE);
  831. ::google::protobuf::internal::WireFormatLite::WriteString(
  832. 1, this->error(), output);
  833. }
  834. // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
  835. for (int i = 0; i < this->file_size(); i++) {
  836. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  837. 15, this->file(i), output);
  838. }
  839. if (!unknown_fields().empty()) {
  840. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  841. unknown_fields(), output);
  842. }
  843. }
  844. ::google::protobuf::uint8* CodeGeneratorResponse::SerializeWithCachedSizesToArray(
  845. ::google::protobuf::uint8* target) const {
  846. // optional string error = 1;
  847. if (has_error()) {
  848. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  849. this->error().data(), this->error().length(),
  850. ::google::protobuf::internal::WireFormat::SERIALIZE);
  851. target =
  852. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  853. 1, this->error(), target);
  854. }
  855. // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
  856. for (int i = 0; i < this->file_size(); i++) {
  857. target = ::google::protobuf::internal::WireFormatLite::
  858. WriteMessageNoVirtualToArray(
  859. 15, this->file(i), target);
  860. }
  861. if (!unknown_fields().empty()) {
  862. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  863. unknown_fields(), target);
  864. }
  865. return target;
  866. }
  867. int CodeGeneratorResponse::ByteSize() const {
  868. int total_size = 0;
  869. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  870. // optional string error = 1;
  871. if (has_error()) {
  872. total_size += 1 +
  873. ::google::protobuf::internal::WireFormatLite::StringSize(
  874. this->error());
  875. }
  876. }
  877. // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
  878. total_size += 1 * this->file_size();
  879. for (int i = 0; i < this->file_size(); i++) {
  880. total_size +=
  881. ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
  882. this->file(i));
  883. }
  884. if (!unknown_fields().empty()) {
  885. total_size +=
  886. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  887. unknown_fields());
  888. }
  889. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  890. _cached_size_ = total_size;
  891. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  892. return total_size;
  893. }
  894. void CodeGeneratorResponse::MergeFrom(const ::google::protobuf::Message& from) {
  895. GOOGLE_CHECK_NE(&from, this);
  896. const CodeGeneratorResponse* source =
  897. ::google::protobuf::internal::dynamic_cast_if_available<const CodeGeneratorResponse*>(
  898. &from);
  899. if (source == NULL) {
  900. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  901. } else {
  902. MergeFrom(*source);
  903. }
  904. }
  905. void CodeGeneratorResponse::MergeFrom(const CodeGeneratorResponse& from) {
  906. GOOGLE_CHECK_NE(&from, this);
  907. file_.MergeFrom(from.file_);
  908. if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  909. if (from.has_error()) {
  910. set_error(from.error());
  911. }
  912. }
  913. mutable_unknown_fields()->MergeFrom(from.unknown_fields());
  914. }
  915. void CodeGeneratorResponse::CopyFrom(const ::google::protobuf::Message& from) {
  916. if (&from == this) return;
  917. Clear();
  918. MergeFrom(from);
  919. }
  920. void CodeGeneratorResponse::CopyFrom(const CodeGeneratorResponse& from) {
  921. if (&from == this) return;
  922. Clear();
  923. MergeFrom(from);
  924. }
  925. bool CodeGeneratorResponse::IsInitialized() const {
  926. return true;
  927. }
  928. void CodeGeneratorResponse::Swap(CodeGeneratorResponse* other) {
  929. if (other != this) {
  930. std::swap(error_, other->error_);
  931. file_.Swap(&other->file_);
  932. std::swap(_has_bits_[0], other->_has_bits_[0]);
  933. _unknown_fields_.Swap(&other->_unknown_fields_);
  934. std::swap(_cached_size_, other->_cached_size_);
  935. }
  936. }
  937. ::google::protobuf::Metadata CodeGeneratorResponse::GetMetadata() const {
  938. protobuf_AssignDescriptorsOnce();
  939. ::google::protobuf::Metadata metadata;
  940. metadata.descriptor = CodeGeneratorResponse_descriptor_;
  941. metadata.reflection = CodeGeneratorResponse_reflection_;
  942. return metadata;
  943. }
  944. // @@protoc_insertion_point(namespace_scope)
  945. } // namespace compiler
  946. } // namespace protobuf
  947. } // namespace google
  948. // @@protoc_insertion_point(global_scope)