PageRenderTime 51ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 1ms

/src/google/protobuf/compiler/plugin.pb.h

http://protobuf.googlecode.com/
C Header | 856 lines | 714 code | 98 blank | 44 comment | 90 complexity | 67416780e488751f9aa05c4be498cd05 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/compiler/plugin.proto
  3. #ifndef PROTOBUF_google_2fprotobuf_2fcompiler_2fplugin_2eproto__INCLUDED
  4. #define PROTOBUF_google_2fprotobuf_2fcompiler_2fplugin_2eproto__INCLUDED
  5. #include <string>
  6. #include <google/protobuf/stubs/common.h>
  7. #if GOOGLE_PROTOBUF_VERSION < 2005001
  8. #error This file was generated by a newer version of protoc which is
  9. #error incompatible with your Protocol Buffer headers. Please update
  10. #error your headers.
  11. #endif
  12. #if 2005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
  13. #error This file was generated by an older version of protoc which is
  14. #error incompatible with your Protocol Buffer headers. Please
  15. #error regenerate this file with a newer version of protoc.
  16. #endif
  17. #include <google/protobuf/generated_message_util.h>
  18. #include <google/protobuf/message.h>
  19. #include <google/protobuf/repeated_field.h>
  20. #include <google/protobuf/extension_set.h>
  21. #include <google/protobuf/unknown_field_set.h>
  22. #include "google/protobuf/descriptor.pb.h"
  23. // @@protoc_insertion_point(includes)
  24. namespace google {
  25. namespace protobuf {
  26. namespace compiler {
  27. // Internal implementation detail -- do not call these.
  28. void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
  29. void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
  30. void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
  31. class CodeGeneratorRequest;
  32. class CodeGeneratorResponse;
  33. class CodeGeneratorResponse_File;
  34. // ===================================================================
  35. class LIBPROTOC_EXPORT CodeGeneratorRequest : public ::google::protobuf::Message {
  36. public:
  37. CodeGeneratorRequest();
  38. virtual ~CodeGeneratorRequest();
  39. CodeGeneratorRequest(const CodeGeneratorRequest& from);
  40. inline CodeGeneratorRequest& operator=(const CodeGeneratorRequest& from) {
  41. CopyFrom(from);
  42. return *this;
  43. }
  44. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  45. return _unknown_fields_;
  46. }
  47. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  48. return &_unknown_fields_;
  49. }
  50. static const ::google::protobuf::Descriptor* descriptor();
  51. static const CodeGeneratorRequest& default_instance();
  52. void Swap(CodeGeneratorRequest* other);
  53. // implements Message ----------------------------------------------
  54. CodeGeneratorRequest* New() const;
  55. void CopyFrom(const ::google::protobuf::Message& from);
  56. void MergeFrom(const ::google::protobuf::Message& from);
  57. void CopyFrom(const CodeGeneratorRequest& from);
  58. void MergeFrom(const CodeGeneratorRequest& from);
  59. void Clear();
  60. bool IsInitialized() const;
  61. int ByteSize() const;
  62. bool MergePartialFromCodedStream(
  63. ::google::protobuf::io::CodedInputStream* input);
  64. void SerializeWithCachedSizes(
  65. ::google::protobuf::io::CodedOutputStream* output) const;
  66. ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  67. int GetCachedSize() const { return _cached_size_; }
  68. private:
  69. void SharedCtor();
  70. void SharedDtor();
  71. void SetCachedSize(int size) const;
  72. public:
  73. ::google::protobuf::Metadata GetMetadata() const;
  74. // nested types ----------------------------------------------------
  75. // accessors -------------------------------------------------------
  76. // repeated string file_to_generate = 1;
  77. inline int file_to_generate_size() const;
  78. inline void clear_file_to_generate();
  79. static const int kFileToGenerateFieldNumber = 1;
  80. inline const ::std::string& file_to_generate(int index) const;
  81. inline ::std::string* mutable_file_to_generate(int index);
  82. inline void set_file_to_generate(int index, const ::std::string& value);
  83. inline void set_file_to_generate(int index, const char* value);
  84. inline void set_file_to_generate(int index, const char* value, size_t size);
  85. inline ::std::string* add_file_to_generate();
  86. inline void add_file_to_generate(const ::std::string& value);
  87. inline void add_file_to_generate(const char* value);
  88. inline void add_file_to_generate(const char* value, size_t size);
  89. inline const ::google::protobuf::RepeatedPtrField< ::std::string>& file_to_generate() const;
  90. inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_file_to_generate();
  91. // optional string parameter = 2;
  92. inline bool has_parameter() const;
  93. inline void clear_parameter();
  94. static const int kParameterFieldNumber = 2;
  95. inline const ::std::string& parameter() const;
  96. inline void set_parameter(const ::std::string& value);
  97. inline void set_parameter(const char* value);
  98. inline void set_parameter(const char* value, size_t size);
  99. inline ::std::string* mutable_parameter();
  100. inline ::std::string* release_parameter();
  101. inline void set_allocated_parameter(::std::string* parameter);
  102. // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
  103. inline int proto_file_size() const;
  104. inline void clear_proto_file();
  105. static const int kProtoFileFieldNumber = 15;
  106. inline const ::google::protobuf::FileDescriptorProto& proto_file(int index) const;
  107. inline ::google::protobuf::FileDescriptorProto* mutable_proto_file(int index);
  108. inline ::google::protobuf::FileDescriptorProto* add_proto_file();
  109. inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
  110. proto_file() const;
  111. inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >*
  112. mutable_proto_file();
  113. // @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorRequest)
  114. private:
  115. inline void set_has_parameter();
  116. inline void clear_has_parameter();
  117. ::google::protobuf::UnknownFieldSet _unknown_fields_;
  118. ::google::protobuf::RepeatedPtrField< ::std::string> file_to_generate_;
  119. ::std::string* parameter_;
  120. ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto > proto_file_;
  121. mutable int _cached_size_;
  122. ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
  123. friend void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
  124. friend void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
  125. friend void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
  126. void InitAsDefaultInstance();
  127. static CodeGeneratorRequest* default_instance_;
  128. };
  129. // -------------------------------------------------------------------
  130. class LIBPROTOC_EXPORT CodeGeneratorResponse_File : public ::google::protobuf::Message {
  131. public:
  132. CodeGeneratorResponse_File();
  133. virtual ~CodeGeneratorResponse_File();
  134. CodeGeneratorResponse_File(const CodeGeneratorResponse_File& from);
  135. inline CodeGeneratorResponse_File& operator=(const CodeGeneratorResponse_File& from) {
  136. CopyFrom(from);
  137. return *this;
  138. }
  139. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  140. return _unknown_fields_;
  141. }
  142. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  143. return &_unknown_fields_;
  144. }
  145. static const ::google::protobuf::Descriptor* descriptor();
  146. static const CodeGeneratorResponse_File& default_instance();
  147. void Swap(CodeGeneratorResponse_File* other);
  148. // implements Message ----------------------------------------------
  149. CodeGeneratorResponse_File* New() const;
  150. void CopyFrom(const ::google::protobuf::Message& from);
  151. void MergeFrom(const ::google::protobuf::Message& from);
  152. void CopyFrom(const CodeGeneratorResponse_File& from);
  153. void MergeFrom(const CodeGeneratorResponse_File& from);
  154. void Clear();
  155. bool IsInitialized() const;
  156. int ByteSize() const;
  157. bool MergePartialFromCodedStream(
  158. ::google::protobuf::io::CodedInputStream* input);
  159. void SerializeWithCachedSizes(
  160. ::google::protobuf::io::CodedOutputStream* output) const;
  161. ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  162. int GetCachedSize() const { return _cached_size_; }
  163. private:
  164. void SharedCtor();
  165. void SharedDtor();
  166. void SetCachedSize(int size) const;
  167. public:
  168. ::google::protobuf::Metadata GetMetadata() const;
  169. // nested types ----------------------------------------------------
  170. // accessors -------------------------------------------------------
  171. // optional string name = 1;
  172. inline bool has_name() const;
  173. inline void clear_name();
  174. static const int kNameFieldNumber = 1;
  175. inline const ::std::string& name() const;
  176. inline void set_name(const ::std::string& value);
  177. inline void set_name(const char* value);
  178. inline void set_name(const char* value, size_t size);
  179. inline ::std::string* mutable_name();
  180. inline ::std::string* release_name();
  181. inline void set_allocated_name(::std::string* name);
  182. // optional string insertion_point = 2;
  183. inline bool has_insertion_point() const;
  184. inline void clear_insertion_point();
  185. static const int kInsertionPointFieldNumber = 2;
  186. inline const ::std::string& insertion_point() const;
  187. inline void set_insertion_point(const ::std::string& value);
  188. inline void set_insertion_point(const char* value);
  189. inline void set_insertion_point(const char* value, size_t size);
  190. inline ::std::string* mutable_insertion_point();
  191. inline ::std::string* release_insertion_point();
  192. inline void set_allocated_insertion_point(::std::string* insertion_point);
  193. // optional string content = 15;
  194. inline bool has_content() const;
  195. inline void clear_content();
  196. static const int kContentFieldNumber = 15;
  197. inline const ::std::string& content() const;
  198. inline void set_content(const ::std::string& value);
  199. inline void set_content(const char* value);
  200. inline void set_content(const char* value, size_t size);
  201. inline ::std::string* mutable_content();
  202. inline ::std::string* release_content();
  203. inline void set_allocated_content(::std::string* content);
  204. // @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse.File)
  205. private:
  206. inline void set_has_name();
  207. inline void clear_has_name();
  208. inline void set_has_insertion_point();
  209. inline void clear_has_insertion_point();
  210. inline void set_has_content();
  211. inline void clear_has_content();
  212. ::google::protobuf::UnknownFieldSet _unknown_fields_;
  213. ::std::string* name_;
  214. ::std::string* insertion_point_;
  215. ::std::string* content_;
  216. mutable int _cached_size_;
  217. ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
  218. friend void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
  219. friend void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
  220. friend void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
  221. void InitAsDefaultInstance();
  222. static CodeGeneratorResponse_File* default_instance_;
  223. };
  224. // -------------------------------------------------------------------
  225. class LIBPROTOC_EXPORT CodeGeneratorResponse : public ::google::protobuf::Message {
  226. public:
  227. CodeGeneratorResponse();
  228. virtual ~CodeGeneratorResponse();
  229. CodeGeneratorResponse(const CodeGeneratorResponse& from);
  230. inline CodeGeneratorResponse& operator=(const CodeGeneratorResponse& from) {
  231. CopyFrom(from);
  232. return *this;
  233. }
  234. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  235. return _unknown_fields_;
  236. }
  237. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  238. return &_unknown_fields_;
  239. }
  240. static const ::google::protobuf::Descriptor* descriptor();
  241. static const CodeGeneratorResponse& default_instance();
  242. void Swap(CodeGeneratorResponse* other);
  243. // implements Message ----------------------------------------------
  244. CodeGeneratorResponse* New() const;
  245. void CopyFrom(const ::google::protobuf::Message& from);
  246. void MergeFrom(const ::google::protobuf::Message& from);
  247. void CopyFrom(const CodeGeneratorResponse& from);
  248. void MergeFrom(const CodeGeneratorResponse& from);
  249. void Clear();
  250. bool IsInitialized() const;
  251. int ByteSize() const;
  252. bool MergePartialFromCodedStream(
  253. ::google::protobuf::io::CodedInputStream* input);
  254. void SerializeWithCachedSizes(
  255. ::google::protobuf::io::CodedOutputStream* output) const;
  256. ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  257. int GetCachedSize() const { return _cached_size_; }
  258. private:
  259. void SharedCtor();
  260. void SharedDtor();
  261. void SetCachedSize(int size) const;
  262. public:
  263. ::google::protobuf::Metadata GetMetadata() const;
  264. // nested types ----------------------------------------------------
  265. typedef CodeGeneratorResponse_File File;
  266. // accessors -------------------------------------------------------
  267. // optional string error = 1;
  268. inline bool has_error() const;
  269. inline void clear_error();
  270. static const int kErrorFieldNumber = 1;
  271. inline const ::std::string& error() const;
  272. inline void set_error(const ::std::string& value);
  273. inline void set_error(const char* value);
  274. inline void set_error(const char* value, size_t size);
  275. inline ::std::string* mutable_error();
  276. inline ::std::string* release_error();
  277. inline void set_allocated_error(::std::string* error);
  278. // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
  279. inline int file_size() const;
  280. inline void clear_file();
  281. static const int kFileFieldNumber = 15;
  282. inline const ::google::protobuf::compiler::CodeGeneratorResponse_File& file(int index) const;
  283. inline ::google::protobuf::compiler::CodeGeneratorResponse_File* mutable_file(int index);
  284. inline ::google::protobuf::compiler::CodeGeneratorResponse_File* add_file();
  285. inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >&
  286. file() const;
  287. inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >*
  288. mutable_file();
  289. // @@protoc_insertion_point(class_scope:google.protobuf.compiler.CodeGeneratorResponse)
  290. private:
  291. inline void set_has_error();
  292. inline void clear_has_error();
  293. ::google::protobuf::UnknownFieldSet _unknown_fields_;
  294. ::std::string* error_;
  295. ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File > file_;
  296. mutable int _cached_size_;
  297. ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
  298. friend void LIBPROTOC_EXPORT protobuf_AddDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
  299. friend void protobuf_AssignDesc_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
  300. friend void protobuf_ShutdownFile_google_2fprotobuf_2fcompiler_2fplugin_2eproto();
  301. void InitAsDefaultInstance();
  302. static CodeGeneratorResponse* default_instance_;
  303. };
  304. // ===================================================================
  305. // ===================================================================
  306. // CodeGeneratorRequest
  307. // repeated string file_to_generate = 1;
  308. inline int CodeGeneratorRequest::file_to_generate_size() const {
  309. return file_to_generate_.size();
  310. }
  311. inline void CodeGeneratorRequest::clear_file_to_generate() {
  312. file_to_generate_.Clear();
  313. }
  314. inline const ::std::string& CodeGeneratorRequest::file_to_generate(int index) const {
  315. return file_to_generate_.Get(index);
  316. }
  317. inline ::std::string* CodeGeneratorRequest::mutable_file_to_generate(int index) {
  318. return file_to_generate_.Mutable(index);
  319. }
  320. inline void CodeGeneratorRequest::set_file_to_generate(int index, const ::std::string& value) {
  321. file_to_generate_.Mutable(index)->assign(value);
  322. }
  323. inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* value) {
  324. file_to_generate_.Mutable(index)->assign(value);
  325. }
  326. inline void CodeGeneratorRequest::set_file_to_generate(int index, const char* value, size_t size) {
  327. file_to_generate_.Mutable(index)->assign(
  328. reinterpret_cast<const char*>(value), size);
  329. }
  330. inline ::std::string* CodeGeneratorRequest::add_file_to_generate() {
  331. return file_to_generate_.Add();
  332. }
  333. inline void CodeGeneratorRequest::add_file_to_generate(const ::std::string& value) {
  334. file_to_generate_.Add()->assign(value);
  335. }
  336. inline void CodeGeneratorRequest::add_file_to_generate(const char* value) {
  337. file_to_generate_.Add()->assign(value);
  338. }
  339. inline void CodeGeneratorRequest::add_file_to_generate(const char* value, size_t size) {
  340. file_to_generate_.Add()->assign(reinterpret_cast<const char*>(value), size);
  341. }
  342. inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
  343. CodeGeneratorRequest::file_to_generate() const {
  344. return file_to_generate_;
  345. }
  346. inline ::google::protobuf::RepeatedPtrField< ::std::string>*
  347. CodeGeneratorRequest::mutable_file_to_generate() {
  348. return &file_to_generate_;
  349. }
  350. // optional string parameter = 2;
  351. inline bool CodeGeneratorRequest::has_parameter() const {
  352. return (_has_bits_[0] & 0x00000002u) != 0;
  353. }
  354. inline void CodeGeneratorRequest::set_has_parameter() {
  355. _has_bits_[0] |= 0x00000002u;
  356. }
  357. inline void CodeGeneratorRequest::clear_has_parameter() {
  358. _has_bits_[0] &= ~0x00000002u;
  359. }
  360. inline void CodeGeneratorRequest::clear_parameter() {
  361. if (parameter_ != &::google::protobuf::internal::GetEmptyString()) {
  362. parameter_->clear();
  363. }
  364. clear_has_parameter();
  365. }
  366. inline const ::std::string& CodeGeneratorRequest::parameter() const {
  367. return *parameter_;
  368. }
  369. inline void CodeGeneratorRequest::set_parameter(const ::std::string& value) {
  370. set_has_parameter();
  371. if (parameter_ == &::google::protobuf::internal::GetEmptyString()) {
  372. parameter_ = new ::std::string;
  373. }
  374. parameter_->assign(value);
  375. }
  376. inline void CodeGeneratorRequest::set_parameter(const char* value) {
  377. set_has_parameter();
  378. if (parameter_ == &::google::protobuf::internal::GetEmptyString()) {
  379. parameter_ = new ::std::string;
  380. }
  381. parameter_->assign(value);
  382. }
  383. inline void CodeGeneratorRequest::set_parameter(const char* value, size_t size) {
  384. set_has_parameter();
  385. if (parameter_ == &::google::protobuf::internal::GetEmptyString()) {
  386. parameter_ = new ::std::string;
  387. }
  388. parameter_->assign(reinterpret_cast<const char*>(value), size);
  389. }
  390. inline ::std::string* CodeGeneratorRequest::mutable_parameter() {
  391. set_has_parameter();
  392. if (parameter_ == &::google::protobuf::internal::GetEmptyString()) {
  393. parameter_ = new ::std::string;
  394. }
  395. return parameter_;
  396. }
  397. inline ::std::string* CodeGeneratorRequest::release_parameter() {
  398. clear_has_parameter();
  399. if (parameter_ == &::google::protobuf::internal::GetEmptyString()) {
  400. return NULL;
  401. } else {
  402. ::std::string* temp = parameter_;
  403. parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  404. return temp;
  405. }
  406. }
  407. inline void CodeGeneratorRequest::set_allocated_parameter(::std::string* parameter) {
  408. if (parameter_ != &::google::protobuf::internal::GetEmptyString()) {
  409. delete parameter_;
  410. }
  411. if (parameter) {
  412. set_has_parameter();
  413. parameter_ = parameter;
  414. } else {
  415. clear_has_parameter();
  416. parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  417. }
  418. }
  419. // repeated .google.protobuf.FileDescriptorProto proto_file = 15;
  420. inline int CodeGeneratorRequest::proto_file_size() const {
  421. return proto_file_.size();
  422. }
  423. inline void CodeGeneratorRequest::clear_proto_file() {
  424. proto_file_.Clear();
  425. }
  426. inline const ::google::protobuf::FileDescriptorProto& CodeGeneratorRequest::proto_file(int index) const {
  427. return proto_file_.Get(index);
  428. }
  429. inline ::google::protobuf::FileDescriptorProto* CodeGeneratorRequest::mutable_proto_file(int index) {
  430. return proto_file_.Mutable(index);
  431. }
  432. inline ::google::protobuf::FileDescriptorProto* CodeGeneratorRequest::add_proto_file() {
  433. return proto_file_.Add();
  434. }
  435. inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >&
  436. CodeGeneratorRequest::proto_file() const {
  437. return proto_file_;
  438. }
  439. inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::FileDescriptorProto >*
  440. CodeGeneratorRequest::mutable_proto_file() {
  441. return &proto_file_;
  442. }
  443. // -------------------------------------------------------------------
  444. // CodeGeneratorResponse_File
  445. // optional string name = 1;
  446. inline bool CodeGeneratorResponse_File::has_name() const {
  447. return (_has_bits_[0] & 0x00000001u) != 0;
  448. }
  449. inline void CodeGeneratorResponse_File::set_has_name() {
  450. _has_bits_[0] |= 0x00000001u;
  451. }
  452. inline void CodeGeneratorResponse_File::clear_has_name() {
  453. _has_bits_[0] &= ~0x00000001u;
  454. }
  455. inline void CodeGeneratorResponse_File::clear_name() {
  456. if (name_ != &::google::protobuf::internal::GetEmptyString()) {
  457. name_->clear();
  458. }
  459. clear_has_name();
  460. }
  461. inline const ::std::string& CodeGeneratorResponse_File::name() const {
  462. return *name_;
  463. }
  464. inline void CodeGeneratorResponse_File::set_name(const ::std::string& value) {
  465. set_has_name();
  466. if (name_ == &::google::protobuf::internal::GetEmptyString()) {
  467. name_ = new ::std::string;
  468. }
  469. name_->assign(value);
  470. }
  471. inline void CodeGeneratorResponse_File::set_name(const char* value) {
  472. set_has_name();
  473. if (name_ == &::google::protobuf::internal::GetEmptyString()) {
  474. name_ = new ::std::string;
  475. }
  476. name_->assign(value);
  477. }
  478. inline void CodeGeneratorResponse_File::set_name(const char* value, size_t size) {
  479. set_has_name();
  480. if (name_ == &::google::protobuf::internal::GetEmptyString()) {
  481. name_ = new ::std::string;
  482. }
  483. name_->assign(reinterpret_cast<const char*>(value), size);
  484. }
  485. inline ::std::string* CodeGeneratorResponse_File::mutable_name() {
  486. set_has_name();
  487. if (name_ == &::google::protobuf::internal::GetEmptyString()) {
  488. name_ = new ::std::string;
  489. }
  490. return name_;
  491. }
  492. inline ::std::string* CodeGeneratorResponse_File::release_name() {
  493. clear_has_name();
  494. if (name_ == &::google::protobuf::internal::GetEmptyString()) {
  495. return NULL;
  496. } else {
  497. ::std::string* temp = name_;
  498. name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  499. return temp;
  500. }
  501. }
  502. inline void CodeGeneratorResponse_File::set_allocated_name(::std::string* name) {
  503. if (name_ != &::google::protobuf::internal::GetEmptyString()) {
  504. delete name_;
  505. }
  506. if (name) {
  507. set_has_name();
  508. name_ = name;
  509. } else {
  510. clear_has_name();
  511. name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  512. }
  513. }
  514. // optional string insertion_point = 2;
  515. inline bool CodeGeneratorResponse_File::has_insertion_point() const {
  516. return (_has_bits_[0] & 0x00000002u) != 0;
  517. }
  518. inline void CodeGeneratorResponse_File::set_has_insertion_point() {
  519. _has_bits_[0] |= 0x00000002u;
  520. }
  521. inline void CodeGeneratorResponse_File::clear_has_insertion_point() {
  522. _has_bits_[0] &= ~0x00000002u;
  523. }
  524. inline void CodeGeneratorResponse_File::clear_insertion_point() {
  525. if (insertion_point_ != &::google::protobuf::internal::GetEmptyString()) {
  526. insertion_point_->clear();
  527. }
  528. clear_has_insertion_point();
  529. }
  530. inline const ::std::string& CodeGeneratorResponse_File::insertion_point() const {
  531. return *insertion_point_;
  532. }
  533. inline void CodeGeneratorResponse_File::set_insertion_point(const ::std::string& value) {
  534. set_has_insertion_point();
  535. if (insertion_point_ == &::google::protobuf::internal::GetEmptyString()) {
  536. insertion_point_ = new ::std::string;
  537. }
  538. insertion_point_->assign(value);
  539. }
  540. inline void CodeGeneratorResponse_File::set_insertion_point(const char* value) {
  541. set_has_insertion_point();
  542. if (insertion_point_ == &::google::protobuf::internal::GetEmptyString()) {
  543. insertion_point_ = new ::std::string;
  544. }
  545. insertion_point_->assign(value);
  546. }
  547. inline void CodeGeneratorResponse_File::set_insertion_point(const char* value, size_t size) {
  548. set_has_insertion_point();
  549. if (insertion_point_ == &::google::protobuf::internal::GetEmptyString()) {
  550. insertion_point_ = new ::std::string;
  551. }
  552. insertion_point_->assign(reinterpret_cast<const char*>(value), size);
  553. }
  554. inline ::std::string* CodeGeneratorResponse_File::mutable_insertion_point() {
  555. set_has_insertion_point();
  556. if (insertion_point_ == &::google::protobuf::internal::GetEmptyString()) {
  557. insertion_point_ = new ::std::string;
  558. }
  559. return insertion_point_;
  560. }
  561. inline ::std::string* CodeGeneratorResponse_File::release_insertion_point() {
  562. clear_has_insertion_point();
  563. if (insertion_point_ == &::google::protobuf::internal::GetEmptyString()) {
  564. return NULL;
  565. } else {
  566. ::std::string* temp = insertion_point_;
  567. insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  568. return temp;
  569. }
  570. }
  571. inline void CodeGeneratorResponse_File::set_allocated_insertion_point(::std::string* insertion_point) {
  572. if (insertion_point_ != &::google::protobuf::internal::GetEmptyString()) {
  573. delete insertion_point_;
  574. }
  575. if (insertion_point) {
  576. set_has_insertion_point();
  577. insertion_point_ = insertion_point;
  578. } else {
  579. clear_has_insertion_point();
  580. insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  581. }
  582. }
  583. // optional string content = 15;
  584. inline bool CodeGeneratorResponse_File::has_content() const {
  585. return (_has_bits_[0] & 0x00000004u) != 0;
  586. }
  587. inline void CodeGeneratorResponse_File::set_has_content() {
  588. _has_bits_[0] |= 0x00000004u;
  589. }
  590. inline void CodeGeneratorResponse_File::clear_has_content() {
  591. _has_bits_[0] &= ~0x00000004u;
  592. }
  593. inline void CodeGeneratorResponse_File::clear_content() {
  594. if (content_ != &::google::protobuf::internal::GetEmptyString()) {
  595. content_->clear();
  596. }
  597. clear_has_content();
  598. }
  599. inline const ::std::string& CodeGeneratorResponse_File::content() const {
  600. return *content_;
  601. }
  602. inline void CodeGeneratorResponse_File::set_content(const ::std::string& value) {
  603. set_has_content();
  604. if (content_ == &::google::protobuf::internal::GetEmptyString()) {
  605. content_ = new ::std::string;
  606. }
  607. content_->assign(value);
  608. }
  609. inline void CodeGeneratorResponse_File::set_content(const char* value) {
  610. set_has_content();
  611. if (content_ == &::google::protobuf::internal::GetEmptyString()) {
  612. content_ = new ::std::string;
  613. }
  614. content_->assign(value);
  615. }
  616. inline void CodeGeneratorResponse_File::set_content(const char* value, size_t size) {
  617. set_has_content();
  618. if (content_ == &::google::protobuf::internal::GetEmptyString()) {
  619. content_ = new ::std::string;
  620. }
  621. content_->assign(reinterpret_cast<const char*>(value), size);
  622. }
  623. inline ::std::string* CodeGeneratorResponse_File::mutable_content() {
  624. set_has_content();
  625. if (content_ == &::google::protobuf::internal::GetEmptyString()) {
  626. content_ = new ::std::string;
  627. }
  628. return content_;
  629. }
  630. inline ::std::string* CodeGeneratorResponse_File::release_content() {
  631. clear_has_content();
  632. if (content_ == &::google::protobuf::internal::GetEmptyString()) {
  633. return NULL;
  634. } else {
  635. ::std::string* temp = content_;
  636. content_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  637. return temp;
  638. }
  639. }
  640. inline void CodeGeneratorResponse_File::set_allocated_content(::std::string* content) {
  641. if (content_ != &::google::protobuf::internal::GetEmptyString()) {
  642. delete content_;
  643. }
  644. if (content) {
  645. set_has_content();
  646. content_ = content;
  647. } else {
  648. clear_has_content();
  649. content_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  650. }
  651. }
  652. // -------------------------------------------------------------------
  653. // CodeGeneratorResponse
  654. // optional string error = 1;
  655. inline bool CodeGeneratorResponse::has_error() const {
  656. return (_has_bits_[0] & 0x00000001u) != 0;
  657. }
  658. inline void CodeGeneratorResponse::set_has_error() {
  659. _has_bits_[0] |= 0x00000001u;
  660. }
  661. inline void CodeGeneratorResponse::clear_has_error() {
  662. _has_bits_[0] &= ~0x00000001u;
  663. }
  664. inline void CodeGeneratorResponse::clear_error() {
  665. if (error_ != &::google::protobuf::internal::GetEmptyString()) {
  666. error_->clear();
  667. }
  668. clear_has_error();
  669. }
  670. inline const ::std::string& CodeGeneratorResponse::error() const {
  671. return *error_;
  672. }
  673. inline void CodeGeneratorResponse::set_error(const ::std::string& value) {
  674. set_has_error();
  675. if (error_ == &::google::protobuf::internal::GetEmptyString()) {
  676. error_ = new ::std::string;
  677. }
  678. error_->assign(value);
  679. }
  680. inline void CodeGeneratorResponse::set_error(const char* value) {
  681. set_has_error();
  682. if (error_ == &::google::protobuf::internal::GetEmptyString()) {
  683. error_ = new ::std::string;
  684. }
  685. error_->assign(value);
  686. }
  687. inline void CodeGeneratorResponse::set_error(const char* value, size_t size) {
  688. set_has_error();
  689. if (error_ == &::google::protobuf::internal::GetEmptyString()) {
  690. error_ = new ::std::string;
  691. }
  692. error_->assign(reinterpret_cast<const char*>(value), size);
  693. }
  694. inline ::std::string* CodeGeneratorResponse::mutable_error() {
  695. set_has_error();
  696. if (error_ == &::google::protobuf::internal::GetEmptyString()) {
  697. error_ = new ::std::string;
  698. }
  699. return error_;
  700. }
  701. inline ::std::string* CodeGeneratorResponse::release_error() {
  702. clear_has_error();
  703. if (error_ == &::google::protobuf::internal::GetEmptyString()) {
  704. return NULL;
  705. } else {
  706. ::std::string* temp = error_;
  707. error_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  708. return temp;
  709. }
  710. }
  711. inline void CodeGeneratorResponse::set_allocated_error(::std::string* error) {
  712. if (error_ != &::google::protobuf::internal::GetEmptyString()) {
  713. delete error_;
  714. }
  715. if (error) {
  716. set_has_error();
  717. error_ = error;
  718. } else {
  719. clear_has_error();
  720. error_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  721. }
  722. }
  723. // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
  724. inline int CodeGeneratorResponse::file_size() const {
  725. return file_.size();
  726. }
  727. inline void CodeGeneratorResponse::clear_file() {
  728. file_.Clear();
  729. }
  730. inline const ::google::protobuf::compiler::CodeGeneratorResponse_File& CodeGeneratorResponse::file(int index) const {
  731. return file_.Get(index);
  732. }
  733. inline ::google::protobuf::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::mutable_file(int index) {
  734. return file_.Mutable(index);
  735. }
  736. inline ::google::protobuf::compiler::CodeGeneratorResponse_File* CodeGeneratorResponse::add_file() {
  737. return file_.Add();
  738. }
  739. inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >&
  740. CodeGeneratorResponse::file() const {
  741. return file_;
  742. }
  743. inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::compiler::CodeGeneratorResponse_File >*
  744. CodeGeneratorResponse::mutable_file() {
  745. return &file_;
  746. }
  747. // @@protoc_insertion_point(namespace_scope)
  748. } // namespace compiler
  749. } // namespace protobuf
  750. } // namespace google
  751. #ifndef SWIG
  752. namespace google {
  753. namespace protobuf {
  754. } // namespace google
  755. } // namespace protobuf
  756. #endif // SWIG
  757. // @@protoc_insertion_point(global_scope)
  758. #endif // PROTOBUF_google_2fprotobuf_2fcompiler_2fplugin_2eproto__INCLUDED