plugin.pb.cc 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/compiler/plugin.proto
  3. #include <google/protobuf/compiler/plugin.pb.h>
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.h>
  7. #include <google/protobuf/io/coded_stream.h>
  8. #include <google/protobuf/wire_format_lite_inl.h>
  9. #include <google/protobuf/descriptor.h>
  10. #include <google/protobuf/generated_message_reflection.h>
  11. #include <google/protobuf/reflection_ops.h>
  12. #include <google/protobuf/wire_format.h>
  13. // This is a temporary google only hack
  14. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  15. #include "third_party/protobuf/version.h"
  16. #endif
  17. // @@protoc_insertion_point(includes)
  18. namespace protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto {
  19. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_CodeGeneratorResponse_File;
  20. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Version;
  21. } // namespace protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto
  22. namespace protobuf_google_2fprotobuf_2fdescriptor_2eproto {
  23. extern PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fdescriptor_2eproto ::google::protobuf::internal::SCCInfo<6> scc_info_FileDescriptorProto;
  24. } // namespace protobuf_google_2fprotobuf_2fdescriptor_2eproto
  25. namespace google {
  26. namespace protobuf {
  27. namespace compiler {
  28. class VersionDefaultTypeInternal {
  29. public:
  30. ::google::protobuf::internal::ExplicitlyConstructed<Version>
  31. _instance;
  32. } _Version_default_instance_;
  33. class CodeGeneratorRequestDefaultTypeInternal {
  34. public:
  35. ::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorRequest>
  36. _instance;
  37. } _CodeGeneratorRequest_default_instance_;
  38. class CodeGeneratorResponse_FileDefaultTypeInternal {
  39. public:
  40. ::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorResponse_File>
  41. _instance;
  42. } _CodeGeneratorResponse_File_default_instance_;
  43. class CodeGeneratorResponseDefaultTypeInternal {
  44. public:
  45. ::google::protobuf::internal::ExplicitlyConstructed<CodeGeneratorResponse>
  46. _instance;
  47. } _CodeGeneratorResponse_default_instance_;
  48. } // namespace compiler
  49. } // namespace protobuf
  50. } // namespace google
  51. namespace protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto {
  52. static void InitDefaultsVersion() {
  53. GOOGLE_PROTOBUF_VERIFY_VERSION;
  54. {
  55. void* ptr = &::google::protobuf::compiler::_Version_default_instance_;
  56. new (ptr) ::google::protobuf::compiler::Version();
  57. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  58. }
  59. ::google::protobuf::compiler::Version::InitAsDefaultInstance();
  60. }
  61. LIBPROTOC_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_Version =
  62. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsVersion}, {}};
  63. static void InitDefaultsCodeGeneratorRequest() {
  64. GOOGLE_PROTOBUF_VERIFY_VERSION;
  65. {
  66. void* ptr = &::google::protobuf::compiler::_CodeGeneratorRequest_default_instance_;
  67. new (ptr) ::google::protobuf::compiler::CodeGeneratorRequest();
  68. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  69. }
  70. ::google::protobuf::compiler::CodeGeneratorRequest::InitAsDefaultInstance();
  71. }
  72. LIBPROTOC_EXPORT ::google::protobuf::internal::SCCInfo<2> scc_info_CodeGeneratorRequest =
  73. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsCodeGeneratorRequest}, {
  74. &protobuf_google_2fprotobuf_2fdescriptor_2eproto::scc_info_FileDescriptorProto.base,
  75. &protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_Version.base,}};
  76. static void InitDefaultsCodeGeneratorResponse_File() {
  77. GOOGLE_PROTOBUF_VERIFY_VERSION;
  78. {
  79. void* ptr = &::google::protobuf::compiler::_CodeGeneratorResponse_File_default_instance_;
  80. new (ptr) ::google::protobuf::compiler::CodeGeneratorResponse_File();
  81. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  82. }
  83. ::google::protobuf::compiler::CodeGeneratorResponse_File::InitAsDefaultInstance();
  84. }
  85. LIBPROTOC_EXPORT ::google::protobuf::internal::SCCInfo<0> scc_info_CodeGeneratorResponse_File =
  86. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCodeGeneratorResponse_File}, {}};
  87. static void InitDefaultsCodeGeneratorResponse() {
  88. GOOGLE_PROTOBUF_VERIFY_VERSION;
  89. {
  90. void* ptr = &::google::protobuf::compiler::_CodeGeneratorResponse_default_instance_;
  91. new (ptr) ::google::protobuf::compiler::CodeGeneratorResponse();
  92. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  93. }
  94. ::google::protobuf::compiler::CodeGeneratorResponse::InitAsDefaultInstance();
  95. }
  96. LIBPROTOC_EXPORT ::google::protobuf::internal::SCCInfo<1> scc_info_CodeGeneratorResponse =
  97. {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsCodeGeneratorResponse}, {
  98. &protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_CodeGeneratorResponse_File.base,}};
  99. void InitDefaults() {
  100. ::google::protobuf::internal::InitSCC(&scc_info_Version.base);
  101. ::google::protobuf::internal::InitSCC(&scc_info_CodeGeneratorRequest.base);
  102. ::google::protobuf::internal::InitSCC(&scc_info_CodeGeneratorResponse_File.base);
  103. ::google::protobuf::internal::InitSCC(&scc_info_CodeGeneratorResponse.base);
  104. }
  105. ::google::protobuf::Metadata file_level_metadata[4];
  106. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  107. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::Version, _has_bits_),
  108. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::Version, _internal_metadata_),
  109. ~0u, // no _extensions_
  110. ~0u, // no _oneof_case_
  111. ~0u, // no _weak_field_map_
  112. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::Version, major_),
  113. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::Version, minor_),
  114. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::Version, patch_),
  115. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::Version, suffix_),
  116. 1,
  117. 2,
  118. 3,
  119. 0,
  120. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorRequest, _has_bits_),
  121. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorRequest, _internal_metadata_),
  122. ~0u, // no _extensions_
  123. ~0u, // no _oneof_case_
  124. ~0u, // no _weak_field_map_
  125. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorRequest, file_to_generate_),
  126. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorRequest, parameter_),
  127. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorRequest, proto_file_),
  128. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorRequest, compiler_version_),
  129. ~0u,
  130. 0,
  131. ~0u,
  132. 1,
  133. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse_File, _has_bits_),
  134. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse_File, _internal_metadata_),
  135. ~0u, // no _extensions_
  136. ~0u, // no _oneof_case_
  137. ~0u, // no _weak_field_map_
  138. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse_File, name_),
  139. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse_File, insertion_point_),
  140. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse_File, content_),
  141. 0,
  142. 1,
  143. 2,
  144. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse, _has_bits_),
  145. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse, _internal_metadata_),
  146. ~0u, // no _extensions_
  147. ~0u, // no _oneof_case_
  148. ~0u, // no _weak_field_map_
  149. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse, error_),
  150. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::compiler::CodeGeneratorResponse, file_),
  151. 0,
  152. ~0u,
  153. };
  154. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  155. { 0, 9, sizeof(::google::protobuf::compiler::Version)},
  156. { 13, 22, sizeof(::google::protobuf::compiler::CodeGeneratorRequest)},
  157. { 26, 34, sizeof(::google::protobuf::compiler::CodeGeneratorResponse_File)},
  158. { 37, 44, sizeof(::google::protobuf::compiler::CodeGeneratorResponse)},
  159. };
  160. static ::google::protobuf::Message const * const file_default_instances[] = {
  161. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::compiler::_Version_default_instance_),
  162. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::compiler::_CodeGeneratorRequest_default_instance_),
  163. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::compiler::_CodeGeneratorResponse_File_default_instance_),
  164. reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::compiler::_CodeGeneratorResponse_default_instance_),
  165. };
  166. void protobuf_AssignDescriptors() {
  167. AddDescriptors();
  168. AssignDescriptors(
  169. "google/protobuf/compiler/plugin.proto", schemas, file_default_instances, TableStruct::offsets,
  170. file_level_metadata, NULL, NULL);
  171. }
  172. void protobuf_AssignDescriptorsOnce() {
  173. static ::google::protobuf::internal::once_flag once;
  174. ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
  175. }
  176. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  177. void protobuf_RegisterTypes(const ::std::string&) {
  178. protobuf_AssignDescriptorsOnce();
  179. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 4);
  180. }
  181. void AddDescriptorsImpl() {
  182. InitDefaults();
  183. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  184. "\n%google/protobuf/compiler/plugin.proto\022"
  185. "\030google.protobuf.compiler\032 google/protob"
  186. "uf/descriptor.proto\"F\n\007Version\022\r\n\005major\030"
  187. "\001 \001(\005\022\r\n\005minor\030\002 \001(\005\022\r\n\005patch\030\003 \001(\005\022\016\n\006s"
  188. "uffix\030\004 \001(\t\"\272\001\n\024CodeGeneratorRequest\022\030\n\020"
  189. "file_to_generate\030\001 \003(\t\022\021\n\tparameter\030\002 \001("
  190. "\t\0228\n\nproto_file\030\017 \003(\0132$.google.protobuf."
  191. "FileDescriptorProto\022;\n\020compiler_version\030"
  192. "\003 \001(\0132!.google.protobuf.compiler.Version"
  193. "\"\252\001\n\025CodeGeneratorResponse\022\r\n\005error\030\001 \001("
  194. "\t\022B\n\004file\030\017 \003(\01324.google.protobuf.compil"
  195. "er.CodeGeneratorResponse.File\032>\n\004File\022\014\n"
  196. "\004name\030\001 \001(\t\022\027\n\017insertion_point\030\002 \001(\t\022\017\n\007"
  197. "content\030\017 \001(\tBg\n\034com.google.protobuf.com"
  198. "pilerB\014PluginProtosZ9github.com/golang/p"
  199. "rotobuf/protoc-gen-go/plugin;plugin_go"
  200. };
  201. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  202. descriptor, 638);
  203. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  204. "google/protobuf/compiler/plugin.proto", &protobuf_RegisterTypes);
  205. ::protobuf_google_2fprotobuf_2fdescriptor_2eproto::AddDescriptors();
  206. }
  207. void AddDescriptors() {
  208. static ::google::protobuf::internal::once_flag once;
  209. ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
  210. }
  211. // Force AddDescriptors() to be called at dynamic initialization time.
  212. struct StaticDescriptorInitializer {
  213. StaticDescriptorInitializer() {
  214. AddDescriptors();
  215. }
  216. } static_descriptor_initializer;
  217. } // namespace protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto
  218. namespace google {
  219. namespace protobuf {
  220. namespace compiler {
  221. // ===================================================================
  222. void Version::InitAsDefaultInstance() {
  223. }
  224. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  225. const int Version::kMajorFieldNumber;
  226. const int Version::kMinorFieldNumber;
  227. const int Version::kPatchFieldNumber;
  228. const int Version::kSuffixFieldNumber;
  229. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  230. Version::Version()
  231. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  232. ::google::protobuf::internal::InitSCC(
  233. &protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_Version.base);
  234. SharedCtor();
  235. // @@protoc_insertion_point(constructor:google.protobuf.compiler.Version)
  236. }
  237. Version::Version(const Version& from)
  238. : ::google::protobuf::Message(),
  239. _internal_metadata_(NULL),
  240. _has_bits_(from._has_bits_) {
  241. _internal_metadata_.MergeFrom(from._internal_metadata_);
  242. suffix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  243. if (from.has_suffix()) {
  244. suffix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.suffix_);
  245. }
  246. ::memcpy(&major_, &from.major_,
  247. static_cast<size_t>(reinterpret_cast<char*>(&patch_) -
  248. reinterpret_cast<char*>(&major_)) + sizeof(patch_));
  249. // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.Version)
  250. }
  251. void Version::SharedCtor() {
  252. suffix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  253. ::memset(&major_, 0, static_cast<size_t>(
  254. reinterpret_cast<char*>(&patch_) -
  255. reinterpret_cast<char*>(&major_)) + sizeof(patch_));
  256. }
  257. Version::~Version() {
  258. // @@protoc_insertion_point(destructor:google.protobuf.compiler.Version)
  259. SharedDtor();
  260. }
  261. void Version::SharedDtor() {
  262. suffix_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  263. }
  264. void Version::SetCachedSize(int size) const {
  265. _cached_size_.Set(size);
  266. }
  267. const ::google::protobuf::Descriptor* Version::descriptor() {
  268. ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::protobuf_AssignDescriptorsOnce();
  269. return ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  270. }
  271. const Version& Version::default_instance() {
  272. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_Version.base);
  273. return *internal_default_instance();
  274. }
  275. void Version::Clear() {
  276. // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.Version)
  277. ::google::protobuf::uint32 cached_has_bits = 0;
  278. // Prevent compiler warnings about cached_has_bits being unused
  279. (void) cached_has_bits;
  280. cached_has_bits = _has_bits_[0];
  281. if (cached_has_bits & 0x00000001u) {
  282. suffix_.ClearNonDefaultToEmptyNoArena();
  283. }
  284. if (cached_has_bits & 14u) {
  285. ::memset(&major_, 0, static_cast<size_t>(
  286. reinterpret_cast<char*>(&patch_) -
  287. reinterpret_cast<char*>(&major_)) + sizeof(patch_));
  288. }
  289. _has_bits_.Clear();
  290. _internal_metadata_.Clear();
  291. }
  292. bool Version::MergePartialFromCodedStream(
  293. ::google::protobuf::io::CodedInputStream* input) {
  294. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  295. ::google::protobuf::uint32 tag;
  296. // @@protoc_insertion_point(parse_start:google.protobuf.compiler.Version)
  297. for (;;) {
  298. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  299. tag = p.first;
  300. if (!p.second) goto handle_unusual;
  301. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  302. // optional int32 major = 1;
  303. case 1: {
  304. if (static_cast< ::google::protobuf::uint8>(tag) ==
  305. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  306. set_has_major();
  307. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  308. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  309. input, &major_)));
  310. } else {
  311. goto handle_unusual;
  312. }
  313. break;
  314. }
  315. // optional int32 minor = 2;
  316. case 2: {
  317. if (static_cast< ::google::protobuf::uint8>(tag) ==
  318. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  319. set_has_minor();
  320. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  321. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  322. input, &minor_)));
  323. } else {
  324. goto handle_unusual;
  325. }
  326. break;
  327. }
  328. // optional int32 patch = 3;
  329. case 3: {
  330. if (static_cast< ::google::protobuf::uint8>(tag) ==
  331. static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
  332. set_has_patch();
  333. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  334. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  335. input, &patch_)));
  336. } else {
  337. goto handle_unusual;
  338. }
  339. break;
  340. }
  341. // optional string suffix = 4;
  342. case 4: {
  343. if (static_cast< ::google::protobuf::uint8>(tag) ==
  344. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  345. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  346. input, this->mutable_suffix()));
  347. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  348. this->suffix().data(), static_cast<int>(this->suffix().length()),
  349. ::google::protobuf::internal::WireFormat::PARSE,
  350. "google.protobuf.compiler.Version.suffix");
  351. } else {
  352. goto handle_unusual;
  353. }
  354. break;
  355. }
  356. default: {
  357. handle_unusual:
  358. if (tag == 0) {
  359. goto success;
  360. }
  361. DO_(::google::protobuf::internal::WireFormat::SkipField(
  362. input, tag, _internal_metadata_.mutable_unknown_fields()));
  363. break;
  364. }
  365. }
  366. }
  367. success:
  368. // @@protoc_insertion_point(parse_success:google.protobuf.compiler.Version)
  369. return true;
  370. failure:
  371. // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.Version)
  372. return false;
  373. #undef DO_
  374. }
  375. void Version::SerializeWithCachedSizes(
  376. ::google::protobuf::io::CodedOutputStream* output) const {
  377. // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.Version)
  378. ::google::protobuf::uint32 cached_has_bits = 0;
  379. (void) cached_has_bits;
  380. cached_has_bits = _has_bits_[0];
  381. // optional int32 major = 1;
  382. if (cached_has_bits & 0x00000002u) {
  383. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->major(), output);
  384. }
  385. // optional int32 minor = 2;
  386. if (cached_has_bits & 0x00000004u) {
  387. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->minor(), output);
  388. }
  389. // optional int32 patch = 3;
  390. if (cached_has_bits & 0x00000008u) {
  391. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->patch(), output);
  392. }
  393. // optional string suffix = 4;
  394. if (cached_has_bits & 0x00000001u) {
  395. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  396. this->suffix().data(), static_cast<int>(this->suffix().length()),
  397. ::google::protobuf::internal::WireFormat::SERIALIZE,
  398. "google.protobuf.compiler.Version.suffix");
  399. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  400. 4, this->suffix(), output);
  401. }
  402. if (_internal_metadata_.have_unknown_fields()) {
  403. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  404. _internal_metadata_.unknown_fields(), output);
  405. }
  406. // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.Version)
  407. }
  408. ::google::protobuf::uint8* Version::InternalSerializeWithCachedSizesToArray(
  409. bool deterministic, ::google::protobuf::uint8* target) const {
  410. (void)deterministic; // Unused
  411. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.Version)
  412. ::google::protobuf::uint32 cached_has_bits = 0;
  413. (void) cached_has_bits;
  414. cached_has_bits = _has_bits_[0];
  415. // optional int32 major = 1;
  416. if (cached_has_bits & 0x00000002u) {
  417. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->major(), target);
  418. }
  419. // optional int32 minor = 2;
  420. if (cached_has_bits & 0x00000004u) {
  421. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->minor(), target);
  422. }
  423. // optional int32 patch = 3;
  424. if (cached_has_bits & 0x00000008u) {
  425. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->patch(), target);
  426. }
  427. // optional string suffix = 4;
  428. if (cached_has_bits & 0x00000001u) {
  429. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  430. this->suffix().data(), static_cast<int>(this->suffix().length()),
  431. ::google::protobuf::internal::WireFormat::SERIALIZE,
  432. "google.protobuf.compiler.Version.suffix");
  433. target =
  434. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  435. 4, this->suffix(), target);
  436. }
  437. if (_internal_metadata_.have_unknown_fields()) {
  438. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  439. _internal_metadata_.unknown_fields(), target);
  440. }
  441. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.Version)
  442. return target;
  443. }
  444. size_t Version::ByteSizeLong() const {
  445. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.Version)
  446. size_t total_size = 0;
  447. if (_internal_metadata_.have_unknown_fields()) {
  448. total_size +=
  449. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  450. _internal_metadata_.unknown_fields());
  451. }
  452. if (_has_bits_[0 / 32] & 15u) {
  453. // optional string suffix = 4;
  454. if (has_suffix()) {
  455. total_size += 1 +
  456. ::google::protobuf::internal::WireFormatLite::StringSize(
  457. this->suffix());
  458. }
  459. // optional int32 major = 1;
  460. if (has_major()) {
  461. total_size += 1 +
  462. ::google::protobuf::internal::WireFormatLite::Int32Size(
  463. this->major());
  464. }
  465. // optional int32 minor = 2;
  466. if (has_minor()) {
  467. total_size += 1 +
  468. ::google::protobuf::internal::WireFormatLite::Int32Size(
  469. this->minor());
  470. }
  471. // optional int32 patch = 3;
  472. if (has_patch()) {
  473. total_size += 1 +
  474. ::google::protobuf::internal::WireFormatLite::Int32Size(
  475. this->patch());
  476. }
  477. }
  478. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  479. SetCachedSize(cached_size);
  480. return total_size;
  481. }
  482. void Version::MergeFrom(const ::google::protobuf::Message& from) {
  483. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.Version)
  484. GOOGLE_DCHECK_NE(&from, this);
  485. const Version* source =
  486. ::google::protobuf::internal::DynamicCastToGenerated<const Version>(
  487. &from);
  488. if (source == NULL) {
  489. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.Version)
  490. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  491. } else {
  492. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.compiler.Version)
  493. MergeFrom(*source);
  494. }
  495. }
  496. void Version::MergeFrom(const Version& from) {
  497. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.Version)
  498. GOOGLE_DCHECK_NE(&from, this);
  499. _internal_metadata_.MergeFrom(from._internal_metadata_);
  500. ::google::protobuf::uint32 cached_has_bits = 0;
  501. (void) cached_has_bits;
  502. cached_has_bits = from._has_bits_[0];
  503. if (cached_has_bits & 15u) {
  504. if (cached_has_bits & 0x00000001u) {
  505. set_has_suffix();
  506. suffix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.suffix_);
  507. }
  508. if (cached_has_bits & 0x00000002u) {
  509. major_ = from.major_;
  510. }
  511. if (cached_has_bits & 0x00000004u) {
  512. minor_ = from.minor_;
  513. }
  514. if (cached_has_bits & 0x00000008u) {
  515. patch_ = from.patch_;
  516. }
  517. _has_bits_[0] |= cached_has_bits;
  518. }
  519. }
  520. void Version::CopyFrom(const ::google::protobuf::Message& from) {
  521. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.Version)
  522. if (&from == this) return;
  523. Clear();
  524. MergeFrom(from);
  525. }
  526. void Version::CopyFrom(const Version& from) {
  527. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.Version)
  528. if (&from == this) return;
  529. Clear();
  530. MergeFrom(from);
  531. }
  532. bool Version::IsInitialized() const {
  533. return true;
  534. }
  535. void Version::Swap(Version* other) {
  536. if (other == this) return;
  537. InternalSwap(other);
  538. }
  539. void Version::InternalSwap(Version* other) {
  540. using std::swap;
  541. suffix_.Swap(&other->suffix_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  542. GetArenaNoVirtual());
  543. swap(major_, other->major_);
  544. swap(minor_, other->minor_);
  545. swap(patch_, other->patch_);
  546. swap(_has_bits_[0], other->_has_bits_[0]);
  547. _internal_metadata_.Swap(&other->_internal_metadata_);
  548. }
  549. ::google::protobuf::Metadata Version::GetMetadata() const {
  550. protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::protobuf_AssignDescriptorsOnce();
  551. return ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::file_level_metadata[kIndexInFileMessages];
  552. }
  553. // ===================================================================
  554. void CodeGeneratorRequest::InitAsDefaultInstance() {
  555. ::google::protobuf::compiler::_CodeGeneratorRequest_default_instance_._instance.get_mutable()->compiler_version_ = const_cast< ::google::protobuf::compiler::Version*>(
  556. ::google::protobuf::compiler::Version::internal_default_instance());
  557. }
  558. void CodeGeneratorRequest::clear_proto_file() {
  559. proto_file_.Clear();
  560. }
  561. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  562. const int CodeGeneratorRequest::kFileToGenerateFieldNumber;
  563. const int CodeGeneratorRequest::kParameterFieldNumber;
  564. const int CodeGeneratorRequest::kProtoFileFieldNumber;
  565. const int CodeGeneratorRequest::kCompilerVersionFieldNumber;
  566. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  567. CodeGeneratorRequest::CodeGeneratorRequest()
  568. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  569. ::google::protobuf::internal::InitSCC(
  570. &protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_CodeGeneratorRequest.base);
  571. SharedCtor();
  572. // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorRequest)
  573. }
  574. CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
  575. : ::google::protobuf::Message(),
  576. _internal_metadata_(NULL),
  577. _has_bits_(from._has_bits_),
  578. file_to_generate_(from.file_to_generate_),
  579. proto_file_(from.proto_file_) {
  580. _internal_metadata_.MergeFrom(from._internal_metadata_);
  581. parameter_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  582. if (from.has_parameter()) {
  583. parameter_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parameter_);
  584. }
  585. if (from.has_compiler_version()) {
  586. compiler_version_ = new ::google::protobuf::compiler::Version(*from.compiler_version_);
  587. } else {
  588. compiler_version_ = NULL;
  589. }
  590. // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorRequest)
  591. }
  592. void CodeGeneratorRequest::SharedCtor() {
  593. parameter_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  594. compiler_version_ = NULL;
  595. }
  596. CodeGeneratorRequest::~CodeGeneratorRequest() {
  597. // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorRequest)
  598. SharedDtor();
  599. }
  600. void CodeGeneratorRequest::SharedDtor() {
  601. parameter_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  602. if (this != internal_default_instance()) delete compiler_version_;
  603. }
  604. void CodeGeneratorRequest::SetCachedSize(int size) const {
  605. _cached_size_.Set(size);
  606. }
  607. const ::google::protobuf::Descriptor* CodeGeneratorRequest::descriptor() {
  608. ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::protobuf_AssignDescriptorsOnce();
  609. return ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  610. }
  611. const CodeGeneratorRequest& CodeGeneratorRequest::default_instance() {
  612. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_CodeGeneratorRequest.base);
  613. return *internal_default_instance();
  614. }
  615. void CodeGeneratorRequest::Clear() {
  616. // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorRequest)
  617. ::google::protobuf::uint32 cached_has_bits = 0;
  618. // Prevent compiler warnings about cached_has_bits being unused
  619. (void) cached_has_bits;
  620. file_to_generate_.Clear();
  621. proto_file_.Clear();
  622. cached_has_bits = _has_bits_[0];
  623. if (cached_has_bits & 3u) {
  624. if (cached_has_bits & 0x00000001u) {
  625. parameter_.ClearNonDefaultToEmptyNoArena();
  626. }
  627. if (cached_has_bits & 0x00000002u) {
  628. GOOGLE_DCHECK(compiler_version_ != NULL);
  629. compiler_version_->Clear();
  630. }
  631. }
  632. _has_bits_.Clear();
  633. _internal_metadata_.Clear();
  634. }
  635. bool CodeGeneratorRequest::MergePartialFromCodedStream(
  636. ::google::protobuf::io::CodedInputStream* input) {
  637. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  638. ::google::protobuf::uint32 tag;
  639. // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorRequest)
  640. for (;;) {
  641. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  642. tag = p.first;
  643. if (!p.second) goto handle_unusual;
  644. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  645. // repeated string file_to_generate = 1;
  646. case 1: {
  647. if (static_cast< ::google::protobuf::uint8>(tag) ==
  648. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  649. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  650. input, this->add_file_to_generate()));
  651. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  652. this->file_to_generate(this->file_to_generate_size() - 1).data(),
  653. static_cast<int>(this->file_to_generate(this->file_to_generate_size() - 1).length()),
  654. ::google::protobuf::internal::WireFormat::PARSE,
  655. "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate");
  656. } else {
  657. goto handle_unusual;
  658. }
  659. break;
  660. }
  661. // optional string parameter = 2;
  662. case 2: {
  663. if (static_cast< ::google::protobuf::uint8>(tag) ==
  664. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  665. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  666. input, this->mutable_parameter()));
  667. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  668. this->parameter().data(), static_cast<int>(this->parameter().length()),
  669. ::google::protobuf::internal::WireFormat::PARSE,
  670. "google.protobuf.compiler.CodeGeneratorRequest.parameter");
  671. } else {
  672. goto handle_unusual;
  673. }
  674. break;
  675. }
  676. // optional .google.protobuf.compiler.Version compiler_version = 3;
  677. case 3: {
  678. if (static_cast< ::google::protobuf::uint8>(tag) ==
  679. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  680. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  681. input, mutable_compiler_version()));
  682. } else {
  683. goto handle_unusual;
  684. }
  685. break;
  686. }
  687. // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
  688. case 15: {
  689. if (static_cast< ::google::protobuf::uint8>(tag) ==
  690. static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
  691. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  692. input, add_proto_file()));
  693. } else {
  694. goto handle_unusual;
  695. }
  696. break;
  697. }
  698. default: {
  699. handle_unusual:
  700. if (tag == 0) {
  701. goto success;
  702. }
  703. DO_(::google::protobuf::internal::WireFormat::SkipField(
  704. input, tag, _internal_metadata_.mutable_unknown_fields()));
  705. break;
  706. }
  707. }
  708. }
  709. success:
  710. // @@protoc_insertion_point(parse_success:google.protobuf.compiler.CodeGeneratorRequest)
  711. return true;
  712. failure:
  713. // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.CodeGeneratorRequest)
  714. return false;
  715. #undef DO_
  716. }
  717. void CodeGeneratorRequest::SerializeWithCachedSizes(
  718. ::google::protobuf::io::CodedOutputStream* output) const {
  719. // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorRequest)
  720. ::google::protobuf::uint32 cached_has_bits = 0;
  721. (void) cached_has_bits;
  722. // repeated string file_to_generate = 1;
  723. for (int i = 0, n = this->file_to_generate_size(); i < n; i++) {
  724. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  725. this->file_to_generate(i).data(), static_cast<int>(this->file_to_generate(i).length()),
  726. ::google::protobuf::internal::WireFormat::SERIALIZE,
  727. "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate");
  728. ::google::protobuf::internal::WireFormatLite::WriteString(
  729. 1, this->file_to_generate(i), output);
  730. }
  731. cached_has_bits = _has_bits_[0];
  732. // optional string parameter = 2;
  733. if (cached_has_bits & 0x00000001u) {
  734. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  735. this->parameter().data(), static_cast<int>(this->parameter().length()),
  736. ::google::protobuf::internal::WireFormat::SERIALIZE,
  737. "google.protobuf.compiler.CodeGeneratorRequest.parameter");
  738. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  739. 2, this->parameter(), output);
  740. }
  741. // optional .google.protobuf.compiler.Version compiler_version = 3;
  742. if (cached_has_bits & 0x00000002u) {
  743. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  744. 3, this->_internal_compiler_version(), output);
  745. }
  746. // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
  747. for (unsigned int i = 0,
  748. n = static_cast<unsigned int>(this->proto_file_size()); i < n; i++) {
  749. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  750. 15,
  751. this->proto_file(static_cast<int>(i)),
  752. output);
  753. }
  754. if (_internal_metadata_.have_unknown_fields()) {
  755. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  756. _internal_metadata_.unknown_fields(), output);
  757. }
  758. // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorRequest)
  759. }
  760. ::google::protobuf::uint8* CodeGeneratorRequest::InternalSerializeWithCachedSizesToArray(
  761. bool deterministic, ::google::protobuf::uint8* target) const {
  762. (void)deterministic; // Unused
  763. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorRequest)
  764. ::google::protobuf::uint32 cached_has_bits = 0;
  765. (void) cached_has_bits;
  766. // repeated string file_to_generate = 1;
  767. for (int i = 0, n = this->file_to_generate_size(); i < n; i++) {
  768. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  769. this->file_to_generate(i).data(), static_cast<int>(this->file_to_generate(i).length()),
  770. ::google::protobuf::internal::WireFormat::SERIALIZE,
  771. "google.protobuf.compiler.CodeGeneratorRequest.file_to_generate");
  772. target = ::google::protobuf::internal::WireFormatLite::
  773. WriteStringToArray(1, this->file_to_generate(i), target);
  774. }
  775. cached_has_bits = _has_bits_[0];
  776. // optional string parameter = 2;
  777. if (cached_has_bits & 0x00000001u) {
  778. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  779. this->parameter().data(), static_cast<int>(this->parameter().length()),
  780. ::google::protobuf::internal::WireFormat::SERIALIZE,
  781. "google.protobuf.compiler.CodeGeneratorRequest.parameter");
  782. target =
  783. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  784. 2, this->parameter(), target);
  785. }
  786. // optional .google.protobuf.compiler.Version compiler_version = 3;
  787. if (cached_has_bits & 0x00000002u) {
  788. target = ::google::protobuf::internal::WireFormatLite::
  789. InternalWriteMessageToArray(
  790. 3, this->_internal_compiler_version(), deterministic, target);
  791. }
  792. // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
  793. for (unsigned int i = 0,
  794. n = static_cast<unsigned int>(this->proto_file_size()); i < n; i++) {
  795. target = ::google::protobuf::internal::WireFormatLite::
  796. InternalWriteMessageToArray(
  797. 15, this->proto_file(static_cast<int>(i)), deterministic, target);
  798. }
  799. if (_internal_metadata_.have_unknown_fields()) {
  800. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  801. _internal_metadata_.unknown_fields(), target);
  802. }
  803. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorRequest)
  804. return target;
  805. }
  806. size_t CodeGeneratorRequest::ByteSizeLong() const {
  807. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorRequest)
  808. size_t total_size = 0;
  809. if (_internal_metadata_.have_unknown_fields()) {
  810. total_size +=
  811. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  812. _internal_metadata_.unknown_fields());
  813. }
  814. // repeated string file_to_generate = 1;
  815. total_size += 1 *
  816. ::google::protobuf::internal::FromIntSize(this->file_to_generate_size());
  817. for (int i = 0, n = this->file_to_generate_size(); i < n; i++) {
  818. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  819. this->file_to_generate(i));
  820. }
  821. // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
  822. {
  823. unsigned int count = static_cast<unsigned int>(this->proto_file_size());
  824. total_size += 1UL * count;
  825. for (unsigned int i = 0; i < count; i++) {
  826. total_size +=
  827. ::google::protobuf::internal::WireFormatLite::MessageSize(
  828. this->proto_file(static_cast<int>(i)));
  829. }
  830. }
  831. if (_has_bits_[0 / 32] & 3u) {
  832. // optional string parameter = 2;
  833. if (has_parameter()) {
  834. total_size += 1 +
  835. ::google::protobuf::internal::WireFormatLite::StringSize(
  836. this->parameter());
  837. }
  838. // optional .google.protobuf.compiler.Version compiler_version = 3;
  839. if (has_compiler_version()) {
  840. total_size += 1 +
  841. ::google::protobuf::internal::WireFormatLite::MessageSize(
  842. *compiler_version_);
  843. }
  844. }
  845. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  846. SetCachedSize(cached_size);
  847. return total_size;
  848. }
  849. void CodeGeneratorRequest::MergeFrom(const ::google::protobuf::Message& from) {
  850. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest)
  851. GOOGLE_DCHECK_NE(&from, this);
  852. const CodeGeneratorRequest* source =
  853. ::google::protobuf::internal::DynamicCastToGenerated<const CodeGeneratorRequest>(
  854. &from);
  855. if (source == NULL) {
  856. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.CodeGeneratorRequest)
  857. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  858. } else {
  859. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.compiler.CodeGeneratorRequest)
  860. MergeFrom(*source);
  861. }
  862. }
  863. void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) {
  864. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorRequest)
  865. GOOGLE_DCHECK_NE(&from, this);
  866. _internal_metadata_.MergeFrom(from._internal_metadata_);
  867. ::google::protobuf::uint32 cached_has_bits = 0;
  868. (void) cached_has_bits;
  869. file_to_generate_.MergeFrom(from.file_to_generate_);
  870. proto_file_.MergeFrom(from.proto_file_);
  871. cached_has_bits = from._has_bits_[0];
  872. if (cached_has_bits & 3u) {
  873. if (cached_has_bits & 0x00000001u) {
  874. set_has_parameter();
  875. parameter_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parameter_);
  876. }
  877. if (cached_has_bits & 0x00000002u) {
  878. mutable_compiler_version()->::google::protobuf::compiler::Version::MergeFrom(from.compiler_version());
  879. }
  880. }
  881. }
  882. void CodeGeneratorRequest::CopyFrom(const ::google::protobuf::Message& from) {
  883. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.CodeGeneratorRequest)
  884. if (&from == this) return;
  885. Clear();
  886. MergeFrom(from);
  887. }
  888. void CodeGeneratorRequest::CopyFrom(const CodeGeneratorRequest& from) {
  889. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.CodeGeneratorRequest)
  890. if (&from == this) return;
  891. Clear();
  892. MergeFrom(from);
  893. }
  894. bool CodeGeneratorRequest::IsInitialized() const {
  895. if (!::google::protobuf::internal::AllAreInitialized(this->proto_file())) return false;
  896. return true;
  897. }
  898. void CodeGeneratorRequest::Swap(CodeGeneratorRequest* other) {
  899. if (other == this) return;
  900. InternalSwap(other);
  901. }
  902. void CodeGeneratorRequest::InternalSwap(CodeGeneratorRequest* other) {
  903. using std::swap;
  904. file_to_generate_.InternalSwap(CastToBase(&other->file_to_generate_));
  905. CastToBase(&proto_file_)->InternalSwap(CastToBase(&other->proto_file_));
  906. parameter_.Swap(&other->parameter_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  907. GetArenaNoVirtual());
  908. swap(compiler_version_, other->compiler_version_);
  909. swap(_has_bits_[0], other->_has_bits_[0]);
  910. _internal_metadata_.Swap(&other->_internal_metadata_);
  911. }
  912. ::google::protobuf::Metadata CodeGeneratorRequest::GetMetadata() const {
  913. protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::protobuf_AssignDescriptorsOnce();
  914. return ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::file_level_metadata[kIndexInFileMessages];
  915. }
  916. // ===================================================================
  917. void CodeGeneratorResponse_File::InitAsDefaultInstance() {
  918. }
  919. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  920. const int CodeGeneratorResponse_File::kNameFieldNumber;
  921. const int CodeGeneratorResponse_File::kInsertionPointFieldNumber;
  922. const int CodeGeneratorResponse_File::kContentFieldNumber;
  923. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  924. CodeGeneratorResponse_File::CodeGeneratorResponse_File()
  925. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  926. ::google::protobuf::internal::InitSCC(
  927. &protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_CodeGeneratorResponse_File.base);
  928. SharedCtor();
  929. // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
  930. }
  931. CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from)
  932. : ::google::protobuf::Message(),
  933. _internal_metadata_(NULL),
  934. _has_bits_(from._has_bits_) {
  935. _internal_metadata_.MergeFrom(from._internal_metadata_);
  936. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  937. if (from.has_name()) {
  938. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  939. }
  940. insertion_point_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  941. if (from.has_insertion_point()) {
  942. insertion_point_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.insertion_point_);
  943. }
  944. content_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  945. if (from.has_content()) {
  946. content_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.content_);
  947. }
  948. // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse.File)
  949. }
  950. void CodeGeneratorResponse_File::SharedCtor() {
  951. name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  952. insertion_point_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  953. content_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  954. }
  955. CodeGeneratorResponse_File::~CodeGeneratorResponse_File() {
  956. // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorResponse.File)
  957. SharedDtor();
  958. }
  959. void CodeGeneratorResponse_File::SharedDtor() {
  960. name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  961. insertion_point_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  962. content_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  963. }
  964. void CodeGeneratorResponse_File::SetCachedSize(int size) const {
  965. _cached_size_.Set(size);
  966. }
  967. const ::google::protobuf::Descriptor* CodeGeneratorResponse_File::descriptor() {
  968. ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::protobuf_AssignDescriptorsOnce();
  969. return ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  970. }
  971. const CodeGeneratorResponse_File& CodeGeneratorResponse_File::default_instance() {
  972. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_CodeGeneratorResponse_File.base);
  973. return *internal_default_instance();
  974. }
  975. void CodeGeneratorResponse_File::Clear() {
  976. // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorResponse.File)
  977. ::google::protobuf::uint32 cached_has_bits = 0;
  978. // Prevent compiler warnings about cached_has_bits being unused
  979. (void) cached_has_bits;
  980. cached_has_bits = _has_bits_[0];
  981. if (cached_has_bits & 7u) {
  982. if (cached_has_bits & 0x00000001u) {
  983. name_.ClearNonDefaultToEmptyNoArena();
  984. }
  985. if (cached_has_bits & 0x00000002u) {
  986. insertion_point_.ClearNonDefaultToEmptyNoArena();
  987. }
  988. if (cached_has_bits & 0x00000004u) {
  989. content_.ClearNonDefaultToEmptyNoArena();
  990. }
  991. }
  992. _has_bits_.Clear();
  993. _internal_metadata_.Clear();
  994. }
  995. bool CodeGeneratorResponse_File::MergePartialFromCodedStream(
  996. ::google::protobuf::io::CodedInputStream* input) {
  997. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  998. ::google::protobuf::uint32 tag;
  999. // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorResponse.File)
  1000. for (;;) {
  1001. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1002. tag = p.first;
  1003. if (!p.second) goto handle_unusual;
  1004. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1005. // optional string name = 1;
  1006. case 1: {
  1007. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1008. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1009. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1010. input, this->mutable_name()));
  1011. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1012. this->name().data(), static_cast<int>(this->name().length()),
  1013. ::google::protobuf::internal::WireFormat::PARSE,
  1014. "google.protobuf.compiler.CodeGeneratorResponse.File.name");
  1015. } else {
  1016. goto handle_unusual;
  1017. }
  1018. break;
  1019. }
  1020. // optional string insertion_point = 2;
  1021. case 2: {
  1022. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1023. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1024. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1025. input, this->mutable_insertion_point()));
  1026. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1027. this->insertion_point().data(), static_cast<int>(this->insertion_point().length()),
  1028. ::google::protobuf::internal::WireFormat::PARSE,
  1029. "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point");
  1030. } else {
  1031. goto handle_unusual;
  1032. }
  1033. break;
  1034. }
  1035. // optional string content = 15;
  1036. case 15: {
  1037. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1038. static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
  1039. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1040. input, this->mutable_content()));
  1041. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1042. this->content().data(), static_cast<int>(this->content().length()),
  1043. ::google::protobuf::internal::WireFormat::PARSE,
  1044. "google.protobuf.compiler.CodeGeneratorResponse.File.content");
  1045. } else {
  1046. goto handle_unusual;
  1047. }
  1048. break;
  1049. }
  1050. default: {
  1051. handle_unusual:
  1052. if (tag == 0) {
  1053. goto success;
  1054. }
  1055. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1056. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1057. break;
  1058. }
  1059. }
  1060. }
  1061. success:
  1062. // @@protoc_insertion_point(parse_success:google.protobuf.compiler.CodeGeneratorResponse.File)
  1063. return true;
  1064. failure:
  1065. // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.CodeGeneratorResponse.File)
  1066. return false;
  1067. #undef DO_
  1068. }
  1069. void CodeGeneratorResponse_File::SerializeWithCachedSizes(
  1070. ::google::protobuf::io::CodedOutputStream* output) const {
  1071. // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorResponse.File)
  1072. ::google::protobuf::uint32 cached_has_bits = 0;
  1073. (void) cached_has_bits;
  1074. cached_has_bits = _has_bits_[0];
  1075. // optional string name = 1;
  1076. if (cached_has_bits & 0x00000001u) {
  1077. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1078. this->name().data(), static_cast<int>(this->name().length()),
  1079. ::google::protobuf::internal::WireFormat::SERIALIZE,
  1080. "google.protobuf.compiler.CodeGeneratorResponse.File.name");
  1081. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1082. 1, this->name(), output);
  1083. }
  1084. // optional string insertion_point = 2;
  1085. if (cached_has_bits & 0x00000002u) {
  1086. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1087. this->insertion_point().data(), static_cast<int>(this->insertion_point().length()),
  1088. ::google::protobuf::internal::WireFormat::SERIALIZE,
  1089. "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point");
  1090. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1091. 2, this->insertion_point(), output);
  1092. }
  1093. // optional string content = 15;
  1094. if (cached_has_bits & 0x00000004u) {
  1095. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1096. this->content().data(), static_cast<int>(this->content().length()),
  1097. ::google::protobuf::internal::WireFormat::SERIALIZE,
  1098. "google.protobuf.compiler.CodeGeneratorResponse.File.content");
  1099. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1100. 15, this->content(), output);
  1101. }
  1102. if (_internal_metadata_.have_unknown_fields()) {
  1103. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1104. _internal_metadata_.unknown_fields(), output);
  1105. }
  1106. // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorResponse.File)
  1107. }
  1108. ::google::protobuf::uint8* CodeGeneratorResponse_File::InternalSerializeWithCachedSizesToArray(
  1109. bool deterministic, ::google::protobuf::uint8* target) const {
  1110. (void)deterministic; // Unused
  1111. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse.File)
  1112. ::google::protobuf::uint32 cached_has_bits = 0;
  1113. (void) cached_has_bits;
  1114. cached_has_bits = _has_bits_[0];
  1115. // optional string name = 1;
  1116. if (cached_has_bits & 0x00000001u) {
  1117. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1118. this->name().data(), static_cast<int>(this->name().length()),
  1119. ::google::protobuf::internal::WireFormat::SERIALIZE,
  1120. "google.protobuf.compiler.CodeGeneratorResponse.File.name");
  1121. target =
  1122. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1123. 1, this->name(), target);
  1124. }
  1125. // optional string insertion_point = 2;
  1126. if (cached_has_bits & 0x00000002u) {
  1127. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1128. this->insertion_point().data(), static_cast<int>(this->insertion_point().length()),
  1129. ::google::protobuf::internal::WireFormat::SERIALIZE,
  1130. "google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point");
  1131. target =
  1132. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1133. 2, this->insertion_point(), target);
  1134. }
  1135. // optional string content = 15;
  1136. if (cached_has_bits & 0x00000004u) {
  1137. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1138. this->content().data(), static_cast<int>(this->content().length()),
  1139. ::google::protobuf::internal::WireFormat::SERIALIZE,
  1140. "google.protobuf.compiler.CodeGeneratorResponse.File.content");
  1141. target =
  1142. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1143. 15, this->content(), target);
  1144. }
  1145. if (_internal_metadata_.have_unknown_fields()) {
  1146. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1147. _internal_metadata_.unknown_fields(), target);
  1148. }
  1149. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorResponse.File)
  1150. return target;
  1151. }
  1152. size_t CodeGeneratorResponse_File::ByteSizeLong() const {
  1153. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse.File)
  1154. size_t total_size = 0;
  1155. if (_internal_metadata_.have_unknown_fields()) {
  1156. total_size +=
  1157. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1158. _internal_metadata_.unknown_fields());
  1159. }
  1160. if (_has_bits_[0 / 32] & 7u) {
  1161. // optional string name = 1;
  1162. if (has_name()) {
  1163. total_size += 1 +
  1164. ::google::protobuf::internal::WireFormatLite::StringSize(
  1165. this->name());
  1166. }
  1167. // optional string insertion_point = 2;
  1168. if (has_insertion_point()) {
  1169. total_size += 1 +
  1170. ::google::protobuf::internal::WireFormatLite::StringSize(
  1171. this->insertion_point());
  1172. }
  1173. // optional string content = 15;
  1174. if (has_content()) {
  1175. total_size += 1 +
  1176. ::google::protobuf::internal::WireFormatLite::StringSize(
  1177. this->content());
  1178. }
  1179. }
  1180. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1181. SetCachedSize(cached_size);
  1182. return total_size;
  1183. }
  1184. void CodeGeneratorResponse_File::MergeFrom(const ::google::protobuf::Message& from) {
  1185. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
  1186. GOOGLE_DCHECK_NE(&from, this);
  1187. const CodeGeneratorResponse_File* source =
  1188. ::google::protobuf::internal::DynamicCastToGenerated<const CodeGeneratorResponse_File>(
  1189. &from);
  1190. if (source == NULL) {
  1191. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.CodeGeneratorResponse.File)
  1192. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1193. } else {
  1194. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.compiler.CodeGeneratorResponse.File)
  1195. MergeFrom(*source);
  1196. }
  1197. }
  1198. void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& from) {
  1199. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
  1200. GOOGLE_DCHECK_NE(&from, this);
  1201. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1202. ::google::protobuf::uint32 cached_has_bits = 0;
  1203. (void) cached_has_bits;
  1204. cached_has_bits = from._has_bits_[0];
  1205. if (cached_has_bits & 7u) {
  1206. if (cached_has_bits & 0x00000001u) {
  1207. set_has_name();
  1208. name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  1209. }
  1210. if (cached_has_bits & 0x00000002u) {
  1211. set_has_insertion_point();
  1212. insertion_point_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.insertion_point_);
  1213. }
  1214. if (cached_has_bits & 0x00000004u) {
  1215. set_has_content();
  1216. content_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.content_);
  1217. }
  1218. }
  1219. }
  1220. void CodeGeneratorResponse_File::CopyFrom(const ::google::protobuf::Message& from) {
  1221. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
  1222. if (&from == this) return;
  1223. Clear();
  1224. MergeFrom(from);
  1225. }
  1226. void CodeGeneratorResponse_File::CopyFrom(const CodeGeneratorResponse_File& from) {
  1227. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse.File)
  1228. if (&from == this) return;
  1229. Clear();
  1230. MergeFrom(from);
  1231. }
  1232. bool CodeGeneratorResponse_File::IsInitialized() const {
  1233. return true;
  1234. }
  1235. void CodeGeneratorResponse_File::Swap(CodeGeneratorResponse_File* other) {
  1236. if (other == this) return;
  1237. InternalSwap(other);
  1238. }
  1239. void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* other) {
  1240. using std::swap;
  1241. name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1242. GetArenaNoVirtual());
  1243. insertion_point_.Swap(&other->insertion_point_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1244. GetArenaNoVirtual());
  1245. content_.Swap(&other->content_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1246. GetArenaNoVirtual());
  1247. swap(_has_bits_[0], other->_has_bits_[0]);
  1248. _internal_metadata_.Swap(&other->_internal_metadata_);
  1249. }
  1250. ::google::protobuf::Metadata CodeGeneratorResponse_File::GetMetadata() const {
  1251. protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::protobuf_AssignDescriptorsOnce();
  1252. return ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::file_level_metadata[kIndexInFileMessages];
  1253. }
  1254. // ===================================================================
  1255. void CodeGeneratorResponse::InitAsDefaultInstance() {
  1256. }
  1257. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1258. const int CodeGeneratorResponse::kErrorFieldNumber;
  1259. const int CodeGeneratorResponse::kFileFieldNumber;
  1260. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1261. CodeGeneratorResponse::CodeGeneratorResponse()
  1262. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1263. ::google::protobuf::internal::InitSCC(
  1264. &protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_CodeGeneratorResponse.base);
  1265. SharedCtor();
  1266. // @@protoc_insertion_point(constructor:google.protobuf.compiler.CodeGeneratorResponse)
  1267. }
  1268. CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from)
  1269. : ::google::protobuf::Message(),
  1270. _internal_metadata_(NULL),
  1271. _has_bits_(from._has_bits_),
  1272. file_(from.file_) {
  1273. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1274. error_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1275. if (from.has_error()) {
  1276. error_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_);
  1277. }
  1278. // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse)
  1279. }
  1280. void CodeGeneratorResponse::SharedCtor() {
  1281. error_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1282. }
  1283. CodeGeneratorResponse::~CodeGeneratorResponse() {
  1284. // @@protoc_insertion_point(destructor:google.protobuf.compiler.CodeGeneratorResponse)
  1285. SharedDtor();
  1286. }
  1287. void CodeGeneratorResponse::SharedDtor() {
  1288. error_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1289. }
  1290. void CodeGeneratorResponse::SetCachedSize(int size) const {
  1291. _cached_size_.Set(size);
  1292. }
  1293. const ::google::protobuf::Descriptor* CodeGeneratorResponse::descriptor() {
  1294. ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::protobuf_AssignDescriptorsOnce();
  1295. return ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1296. }
  1297. const CodeGeneratorResponse& CodeGeneratorResponse::default_instance() {
  1298. ::google::protobuf::internal::InitSCC(&protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::scc_info_CodeGeneratorResponse.base);
  1299. return *internal_default_instance();
  1300. }
  1301. void CodeGeneratorResponse::Clear() {
  1302. // @@protoc_insertion_point(message_clear_start:google.protobuf.compiler.CodeGeneratorResponse)
  1303. ::google::protobuf::uint32 cached_has_bits = 0;
  1304. // Prevent compiler warnings about cached_has_bits being unused
  1305. (void) cached_has_bits;
  1306. file_.Clear();
  1307. cached_has_bits = _has_bits_[0];
  1308. if (cached_has_bits & 0x00000001u) {
  1309. error_.ClearNonDefaultToEmptyNoArena();
  1310. }
  1311. _has_bits_.Clear();
  1312. _internal_metadata_.Clear();
  1313. }
  1314. bool CodeGeneratorResponse::MergePartialFromCodedStream(
  1315. ::google::protobuf::io::CodedInputStream* input) {
  1316. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1317. ::google::protobuf::uint32 tag;
  1318. // @@protoc_insertion_point(parse_start:google.protobuf.compiler.CodeGeneratorResponse)
  1319. for (;;) {
  1320. ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1321. tag = p.first;
  1322. if (!p.second) goto handle_unusual;
  1323. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1324. // optional string error = 1;
  1325. case 1: {
  1326. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1327. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1328. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1329. input, this->mutable_error()));
  1330. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1331. this->error().data(), static_cast<int>(this->error().length()),
  1332. ::google::protobuf::internal::WireFormat::PARSE,
  1333. "google.protobuf.compiler.CodeGeneratorResponse.error");
  1334. } else {
  1335. goto handle_unusual;
  1336. }
  1337. break;
  1338. }
  1339. // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
  1340. case 15: {
  1341. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1342. static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
  1343. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1344. input, add_file()));
  1345. } else {
  1346. goto handle_unusual;
  1347. }
  1348. break;
  1349. }
  1350. default: {
  1351. handle_unusual:
  1352. if (tag == 0) {
  1353. goto success;
  1354. }
  1355. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1356. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1357. break;
  1358. }
  1359. }
  1360. }
  1361. success:
  1362. // @@protoc_insertion_point(parse_success:google.protobuf.compiler.CodeGeneratorResponse)
  1363. return true;
  1364. failure:
  1365. // @@protoc_insertion_point(parse_failure:google.protobuf.compiler.CodeGeneratorResponse)
  1366. return false;
  1367. #undef DO_
  1368. }
  1369. void CodeGeneratorResponse::SerializeWithCachedSizes(
  1370. ::google::protobuf::io::CodedOutputStream* output) const {
  1371. // @@protoc_insertion_point(serialize_start:google.protobuf.compiler.CodeGeneratorResponse)
  1372. ::google::protobuf::uint32 cached_has_bits = 0;
  1373. (void) cached_has_bits;
  1374. cached_has_bits = _has_bits_[0];
  1375. // optional string error = 1;
  1376. if (cached_has_bits & 0x00000001u) {
  1377. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1378. this->error().data(), static_cast<int>(this->error().length()),
  1379. ::google::protobuf::internal::WireFormat::SERIALIZE,
  1380. "google.protobuf.compiler.CodeGeneratorResponse.error");
  1381. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1382. 1, this->error(), output);
  1383. }
  1384. // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
  1385. for (unsigned int i = 0,
  1386. n = static_cast<unsigned int>(this->file_size()); i < n; i++) {
  1387. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1388. 15,
  1389. this->file(static_cast<int>(i)),
  1390. output);
  1391. }
  1392. if (_internal_metadata_.have_unknown_fields()) {
  1393. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1394. _internal_metadata_.unknown_fields(), output);
  1395. }
  1396. // @@protoc_insertion_point(serialize_end:google.protobuf.compiler.CodeGeneratorResponse)
  1397. }
  1398. ::google::protobuf::uint8* CodeGeneratorResponse::InternalSerializeWithCachedSizesToArray(
  1399. bool deterministic, ::google::protobuf::uint8* target) const {
  1400. (void)deterministic; // Unused
  1401. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse)
  1402. ::google::protobuf::uint32 cached_has_bits = 0;
  1403. (void) cached_has_bits;
  1404. cached_has_bits = _has_bits_[0];
  1405. // optional string error = 1;
  1406. if (cached_has_bits & 0x00000001u) {
  1407. ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
  1408. this->error().data(), static_cast<int>(this->error().length()),
  1409. ::google::protobuf::internal::WireFormat::SERIALIZE,
  1410. "google.protobuf.compiler.CodeGeneratorResponse.error");
  1411. target =
  1412. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1413. 1, this->error(), target);
  1414. }
  1415. // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
  1416. for (unsigned int i = 0,
  1417. n = static_cast<unsigned int>(this->file_size()); i < n; i++) {
  1418. target = ::google::protobuf::internal::WireFormatLite::
  1419. InternalWriteMessageToArray(
  1420. 15, this->file(static_cast<int>(i)), deterministic, target);
  1421. }
  1422. if (_internal_metadata_.have_unknown_fields()) {
  1423. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1424. _internal_metadata_.unknown_fields(), target);
  1425. }
  1426. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorResponse)
  1427. return target;
  1428. }
  1429. size_t CodeGeneratorResponse::ByteSizeLong() const {
  1430. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.compiler.CodeGeneratorResponse)
  1431. size_t total_size = 0;
  1432. if (_internal_metadata_.have_unknown_fields()) {
  1433. total_size +=
  1434. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1435. _internal_metadata_.unknown_fields());
  1436. }
  1437. // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
  1438. {
  1439. unsigned int count = static_cast<unsigned int>(this->file_size());
  1440. total_size += 1UL * count;
  1441. for (unsigned int i = 0; i < count; i++) {
  1442. total_size +=
  1443. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1444. this->file(static_cast<int>(i)));
  1445. }
  1446. }
  1447. // optional string error = 1;
  1448. if (has_error()) {
  1449. total_size += 1 +
  1450. ::google::protobuf::internal::WireFormatLite::StringSize(
  1451. this->error());
  1452. }
  1453. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1454. SetCachedSize(cached_size);
  1455. return total_size;
  1456. }
  1457. void CodeGeneratorResponse::MergeFrom(const ::google::protobuf::Message& from) {
  1458. // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse)
  1459. GOOGLE_DCHECK_NE(&from, this);
  1460. const CodeGeneratorResponse* source =
  1461. ::google::protobuf::internal::DynamicCastToGenerated<const CodeGeneratorResponse>(
  1462. &from);
  1463. if (source == NULL) {
  1464. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.compiler.CodeGeneratorResponse)
  1465. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1466. } else {
  1467. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.compiler.CodeGeneratorResponse)
  1468. MergeFrom(*source);
  1469. }
  1470. }
  1471. void CodeGeneratorResponse::MergeFrom(const CodeGeneratorResponse& from) {
  1472. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.compiler.CodeGeneratorResponse)
  1473. GOOGLE_DCHECK_NE(&from, this);
  1474. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1475. ::google::protobuf::uint32 cached_has_bits = 0;
  1476. (void) cached_has_bits;
  1477. file_.MergeFrom(from.file_);
  1478. if (from.has_error()) {
  1479. set_has_error();
  1480. error_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_);
  1481. }
  1482. }
  1483. void CodeGeneratorResponse::CopyFrom(const ::google::protobuf::Message& from) {
  1484. // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse)
  1485. if (&from == this) return;
  1486. Clear();
  1487. MergeFrom(from);
  1488. }
  1489. void CodeGeneratorResponse::CopyFrom(const CodeGeneratorResponse& from) {
  1490. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.compiler.CodeGeneratorResponse)
  1491. if (&from == this) return;
  1492. Clear();
  1493. MergeFrom(from);
  1494. }
  1495. bool CodeGeneratorResponse::IsInitialized() const {
  1496. return true;
  1497. }
  1498. void CodeGeneratorResponse::Swap(CodeGeneratorResponse* other) {
  1499. if (other == this) return;
  1500. InternalSwap(other);
  1501. }
  1502. void CodeGeneratorResponse::InternalSwap(CodeGeneratorResponse* other) {
  1503. using std::swap;
  1504. CastToBase(&file_)->InternalSwap(CastToBase(&other->file_));
  1505. error_.Swap(&other->error_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1506. GetArenaNoVirtual());
  1507. swap(_has_bits_[0], other->_has_bits_[0]);
  1508. _internal_metadata_.Swap(&other->_internal_metadata_);
  1509. }
  1510. ::google::protobuf::Metadata CodeGeneratorResponse::GetMetadata() const {
  1511. protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::protobuf_AssignDescriptorsOnce();
  1512. return ::protobuf_google_2fprotobuf_2fcompiler_2fplugin_2eproto::file_level_metadata[kIndexInFileMessages];
  1513. }
  1514. // @@protoc_insertion_point(namespace_scope)
  1515. } // namespace compiler
  1516. } // namespace protobuf
  1517. } // namespace google
  1518. namespace google {
  1519. namespace protobuf {
  1520. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::compiler::Version* Arena::CreateMaybeMessage< ::google::protobuf::compiler::Version >(Arena* arena) {
  1521. return Arena::CreateInternal< ::google::protobuf::compiler::Version >(arena);
  1522. }
  1523. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::compiler::CodeGeneratorRequest* Arena::CreateMaybeMessage< ::google::protobuf::compiler::CodeGeneratorRequest >(Arena* arena) {
  1524. return Arena::CreateInternal< ::google::protobuf::compiler::CodeGeneratorRequest >(arena);
  1525. }
  1526. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::compiler::CodeGeneratorResponse_File* Arena::CreateMaybeMessage< ::google::protobuf::compiler::CodeGeneratorResponse_File >(Arena* arena) {
  1527. return Arena::CreateInternal< ::google::protobuf::compiler::CodeGeneratorResponse_File >(arena);
  1528. }
  1529. template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::google::protobuf::compiler::CodeGeneratorResponse* Arena::CreateMaybeMessage< ::google::protobuf::compiler::CodeGeneratorResponse >(Arena* arena) {
  1530. return Arena::CreateInternal< ::google::protobuf::compiler::CodeGeneratorResponse >(arena);
  1531. }
  1532. } // namespace protobuf
  1533. } // namespace google
  1534. // @@protoc_insertion_point(global_scope)