PageRenderTime 45ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/protobuf-gdc/test-cases/test.pro.pb.h

http://d-protobuf.googlecode.com/
C Header | 341 lines | 254 code | 60 blank | 27 comment | 22 complexity | 179501d848bfd334add1bdeb1f0fe6cd MD5 | raw file
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: test.pro
  3. #ifndef PROTOBUF_test_2epro__INCLUDED
  4. #define PROTOBUF_test_2epro__INCLUDED
  5. #include <string>
  6. #include <google/protobuf/stubs/common.h>
  7. #if GOOGLE_PROTOBUF_VERSION < 2003000
  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 2003000 < 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/repeated_field.h>
  19. #include <google/protobuf/extension_set.h>
  20. #include <google/protobuf/generated_message_reflection.h>
  21. // @@protoc_insertion_point(includes)
  22. // Internal implementation detail -- do not call these.
  23. void protobuf_AddDesc_test_2epro();
  24. void protobuf_AssignDesc_test_2epro();
  25. void protobuf_ShutdownFile_test_2epro();
  26. class SearchRequest;
  27. class accc;
  28. // ===================================================================
  29. class SearchRequest : public ::google::protobuf::Message {
  30. public:
  31. SearchRequest();
  32. virtual ~SearchRequest();
  33. SearchRequest(const SearchRequest& from);
  34. inline SearchRequest& operator=(const SearchRequest& from) {
  35. CopyFrom(from);
  36. return *this;
  37. }
  38. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  39. return _unknown_fields_;
  40. }
  41. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  42. return &_unknown_fields_;
  43. }
  44. static const ::google::protobuf::Descriptor* descriptor();
  45. static const SearchRequest& default_instance();
  46. void Swap(SearchRequest* other);
  47. // implements Message ----------------------------------------------
  48. SearchRequest* New() const;
  49. void CopyFrom(const ::google::protobuf::Message& from);
  50. void MergeFrom(const ::google::protobuf::Message& from);
  51. void CopyFrom(const SearchRequest& from);
  52. void MergeFrom(const SearchRequest& from);
  53. void Clear();
  54. bool IsInitialized() const;
  55. int ByteSize() const;
  56. bool MergePartialFromCodedStream(
  57. ::google::protobuf::io::CodedInputStream* input);
  58. void SerializeWithCachedSizes(
  59. ::google::protobuf::io::CodedOutputStream* output) const;
  60. ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  61. int GetCachedSize() const { return _cached_size_; }
  62. private:
  63. void SharedCtor();
  64. void SharedDtor();
  65. void SetCachedSize(int size) const;
  66. public:
  67. ::google::protobuf::Metadata GetMetadata() const;
  68. // nested types ----------------------------------------------------
  69. // accessors -------------------------------------------------------
  70. // optional bytes query = 1 [default = "cc"];
  71. inline bool has_query() const;
  72. inline void clear_query();
  73. static const int kQueryFieldNumber = 1;
  74. inline const ::std::string& query() const;
  75. inline void set_query(const ::std::string& value);
  76. inline void set_query(const char* value);
  77. inline void set_query(const void* value, size_t size);
  78. inline ::std::string* mutable_query();
  79. static const int kAaaFieldNumber = 99;
  80. static ::google::protobuf::internal::ExtensionIdentifier< ::accc,
  81. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::int32 >, 5, false >
  82. aaa;
  83. // @@protoc_insertion_point(class_scope:SearchRequest)
  84. private:
  85. ::google::protobuf::UnknownFieldSet _unknown_fields_;
  86. mutable int _cached_size_;
  87. ::std::string* query_;
  88. static const ::std::string _default_query_;
  89. friend void protobuf_AddDesc_test_2epro();
  90. friend void protobuf_AssignDesc_test_2epro();
  91. friend void protobuf_ShutdownFile_test_2epro();
  92. ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
  93. // WHY DOES & HAVE LOWER PRECEDENCE THAN != !?
  94. inline bool _has_bit(int index) const {
  95. return (_has_bits_[index / 32] & (1u << (index % 32))) != 0;
  96. }
  97. inline void _set_bit(int index) {
  98. _has_bits_[index / 32] |= (1u << (index % 32));
  99. }
  100. inline void _clear_bit(int index) {
  101. _has_bits_[index / 32] &= ~(1u << (index % 32));
  102. }
  103. void InitAsDefaultInstance();
  104. static SearchRequest* default_instance_;
  105. };
  106. // -------------------------------------------------------------------
  107. class accc : public ::google::protobuf::Message {
  108. public:
  109. accc();
  110. virtual ~accc();
  111. accc(const accc& from);
  112. inline accc& operator=(const accc& from) {
  113. CopyFrom(from);
  114. return *this;
  115. }
  116. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  117. return _unknown_fields_;
  118. }
  119. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  120. return &_unknown_fields_;
  121. }
  122. static const ::google::protobuf::Descriptor* descriptor();
  123. static const accc& default_instance();
  124. void Swap(accc* other);
  125. // implements Message ----------------------------------------------
  126. accc* New() const;
  127. void CopyFrom(const ::google::protobuf::Message& from);
  128. void MergeFrom(const ::google::protobuf::Message& from);
  129. void CopyFrom(const accc& from);
  130. void MergeFrom(const accc& from);
  131. void Clear();
  132. bool IsInitialized() const;
  133. int ByteSize() const;
  134. bool MergePartialFromCodedStream(
  135. ::google::protobuf::io::CodedInputStream* input);
  136. void SerializeWithCachedSizes(
  137. ::google::protobuf::io::CodedOutputStream* output) const;
  138. ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  139. int GetCachedSize() const { return _cached_size_; }
  140. private:
  141. void SharedCtor();
  142. void SharedDtor();
  143. void SetCachedSize(int size) const;
  144. public:
  145. ::google::protobuf::Metadata GetMetadata() const;
  146. // nested types ----------------------------------------------------
  147. // accessors -------------------------------------------------------
  148. // optional bytes dddd = 1 [packed = false];
  149. inline bool has_dddd() const;
  150. inline void clear_dddd();
  151. static const int kDdddFieldNumber = 1;
  152. inline const ::std::string& dddd() const;
  153. inline void set_dddd(const ::std::string& value);
  154. inline void set_dddd(const char* value);
  155. inline void set_dddd(const void* value, size_t size);
  156. inline ::std::string* mutable_dddd();
  157. GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(accc)
  158. // @@protoc_insertion_point(class_scope:accc)
  159. private:
  160. ::google::protobuf::internal::ExtensionSet _extensions_;
  161. ::google::protobuf::UnknownFieldSet _unknown_fields_;
  162. mutable int _cached_size_;
  163. ::std::string* dddd_;
  164. static const ::std::string _default_dddd_;
  165. friend void protobuf_AddDesc_test_2epro();
  166. friend void protobuf_AssignDesc_test_2epro();
  167. friend void protobuf_ShutdownFile_test_2epro();
  168. ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
  169. // WHY DOES & HAVE LOWER PRECEDENCE THAN != !?
  170. inline bool _has_bit(int index) const {
  171. return (_has_bits_[index / 32] & (1u << (index % 32))) != 0;
  172. }
  173. inline void _set_bit(int index) {
  174. _has_bits_[index / 32] |= (1u << (index % 32));
  175. }
  176. inline void _clear_bit(int index) {
  177. _has_bits_[index / 32] &= ~(1u << (index % 32));
  178. }
  179. void InitAsDefaultInstance();
  180. static accc* default_instance_;
  181. };
  182. // ===================================================================
  183. static const int kBbbbFieldNumber = 9;
  184. extern ::google::protobuf::internal::ExtensionIdentifier< ::accc,
  185. ::google::protobuf::internal::StringTypeTraits, 12, false >
  186. bbbb;
  187. // ===================================================================
  188. // SearchRequest
  189. // optional bytes query = 1 [default = "cc"];
  190. inline bool SearchRequest::has_query() const {
  191. return _has_bit(0);
  192. }
  193. inline void SearchRequest::clear_query() {
  194. if (query_ != &_default_query_) {
  195. query_->assign(_default_query_);
  196. }
  197. _clear_bit(0);
  198. }
  199. inline const ::std::string& SearchRequest::query() const {
  200. return *query_;
  201. }
  202. inline void SearchRequest::set_query(const ::std::string& value) {
  203. _set_bit(0);
  204. if (query_ == &_default_query_) {
  205. query_ = new ::std::string;
  206. }
  207. query_->assign(value);
  208. }
  209. inline void SearchRequest::set_query(const char* value) {
  210. _set_bit(0);
  211. if (query_ == &_default_query_) {
  212. query_ = new ::std::string;
  213. }
  214. query_->assign(value);
  215. }
  216. inline void SearchRequest::set_query(const void* value, size_t size) {
  217. _set_bit(0);
  218. if (query_ == &_default_query_) {
  219. query_ = new ::std::string;
  220. }
  221. query_->assign(reinterpret_cast<const char*>(value), size);
  222. }
  223. inline ::std::string* SearchRequest::mutable_query() {
  224. _set_bit(0);
  225. if (query_ == &_default_query_) {
  226. query_ = new ::std::string(_default_query_);
  227. }
  228. return query_;
  229. }
  230. // -------------------------------------------------------------------
  231. // accc
  232. // optional bytes dddd = 1 [packed = false];
  233. inline bool accc::has_dddd() const {
  234. return _has_bit(0);
  235. }
  236. inline void accc::clear_dddd() {
  237. if (dddd_ != &_default_dddd_) {
  238. dddd_->clear();
  239. }
  240. _clear_bit(0);
  241. }
  242. inline const ::std::string& accc::dddd() const {
  243. return *dddd_;
  244. }
  245. inline void accc::set_dddd(const ::std::string& value) {
  246. _set_bit(0);
  247. if (dddd_ == &_default_dddd_) {
  248. dddd_ = new ::std::string;
  249. }
  250. dddd_->assign(value);
  251. }
  252. inline void accc::set_dddd(const char* value) {
  253. _set_bit(0);
  254. if (dddd_ == &_default_dddd_) {
  255. dddd_ = new ::std::string;
  256. }
  257. dddd_->assign(value);
  258. }
  259. inline void accc::set_dddd(const void* value, size_t size) {
  260. _set_bit(0);
  261. if (dddd_ == &_default_dddd_) {
  262. dddd_ = new ::std::string;
  263. }
  264. dddd_->assign(reinterpret_cast<const char*>(value), size);
  265. }
  266. inline ::std::string* accc::mutable_dddd() {
  267. _set_bit(0);
  268. if (dddd_ == &_default_dddd_) {
  269. dddd_ = new ::std::string;
  270. }
  271. return dddd_;
  272. }
  273. // @@protoc_insertion_point(namespace_scope)
  274. #ifndef SWIG
  275. namespace google {
  276. namespace protobuf {
  277. } // namespace google
  278. } // namespace protobuf
  279. #endif // SWIG
  280. // @@protoc_insertion_point(global_scope)
  281. #endif // PROTOBUF_test_2epro__INCLUDED