PageRenderTime 48ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/shared/xrecorder/protobuf/DataRecord.pb.cc

https://github.com/doughodson/OpenEaaglesExamples
C++ | 439 lines | 347 code | 63 blank | 29 comment | 53 complexity | 39b7ccff81ca28b1d7e426f793ad7ad3 MD5 | raw file
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: xrecorder/protobuf/DataRecord.proto
  3. #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
  4. #include "xrecorder/protobuf/DataRecord.pb.h"
  5. #include <algorithm>
  6. #include <google/protobuf/stubs/common.h>
  7. #include <google/protobuf/stubs/once.h>
  8. #include <google/protobuf/io/coded_stream.h>
  9. #include <google/protobuf/wire_format_lite_inl.h>
  10. #include <google/protobuf/descriptor.h>
  11. #include <google/protobuf/generated_message_reflection.h>
  12. #include <google/protobuf/reflection_ops.h>
  13. #include <google/protobuf/wire_format.h>
  14. // @@protoc_insertion_point(includes)
  15. namespace oe {
  16. namespace xrecorder {
  17. namespace pb {
  18. namespace {
  19. const ::google::protobuf::Descriptor* MyDataMsg_descriptor_ = NULL;
  20. const ::google::protobuf::internal::GeneratedMessageReflection*
  21. MyDataMsg_reflection_ = NULL;
  22. } // namespace
  23. void protobuf_AssignDesc_xrecorder_2fprotobuf_2fDataRecord_2eproto() {
  24. protobuf_AddDesc_xrecorder_2fprotobuf_2fDataRecord_2eproto();
  25. const ::google::protobuf::FileDescriptor* file =
  26. ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
  27. "xrecorder/protobuf/DataRecord.proto");
  28. GOOGLE_CHECK(file != NULL);
  29. MyDataMsg_descriptor_ = file->message_type(0);
  30. static const int MyDataMsg_offsets_[3] = {
  31. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MyDataMsg, fee_),
  32. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MyDataMsg, fi_),
  33. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MyDataMsg, fo_),
  34. };
  35. MyDataMsg_reflection_ =
  36. new ::google::protobuf::internal::GeneratedMessageReflection(
  37. MyDataMsg_descriptor_,
  38. MyDataMsg::default_instance_,
  39. MyDataMsg_offsets_,
  40. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MyDataMsg, _has_bits_[0]),
  41. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MyDataMsg, _unknown_fields_),
  42. -1,
  43. ::google::protobuf::DescriptorPool::generated_pool(),
  44. ::google::protobuf::MessageFactory::generated_factory(),
  45. sizeof(MyDataMsg));
  46. }
  47. namespace {
  48. GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
  49. inline void protobuf_AssignDescriptorsOnce() {
  50. ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
  51. &protobuf_AssignDesc_xrecorder_2fprotobuf_2fDataRecord_2eproto);
  52. }
  53. void protobuf_RegisterTypes(const ::std::string&) {
  54. protobuf_AssignDescriptorsOnce();
  55. ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
  56. MyDataMsg_descriptor_, &MyDataMsg::default_instance());
  57. }
  58. } // namespace
  59. void protobuf_ShutdownFile_xrecorder_2fprotobuf_2fDataRecord_2eproto() {
  60. delete MyDataMsg::default_instance_;
  61. delete MyDataMsg_reflection_;
  62. }
  63. void protobuf_AddDesc_xrecorder_2fprotobuf_2fDataRecord_2eproto() {
  64. static bool already_here = false;
  65. if (already_here) return;
  66. already_here = true;
  67. GOOGLE_PROTOBUF_VERIFY_VERSION;
  68. ::oe::recorder::pb::protobuf_AddDesc_openeaagles_2frecorder_2fprotobuf_2fDataRecord_2eproto();
  69. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  70. "\n#xrecorder/protobuf/DataRecord.proto\022\017o"
  71. "e.xrecorder.pb\032.openeaagles/recorder/pro"
  72. "tobuf/DataRecord.proto\"0\n\tMyDataMsg\022\013\n\003f"
  73. "ee\030\001 \002(\r\022\n\n\002fi\030\002 \002(\r\022\n\n\002fo\030\003 \002(\r:L\n\013my_d"
  74. "ata_msg\022\032.oe.recorder.pb.DataRecord\030\350\007 \001"
  75. "(\0132\032.oe.xrecorder.pb.MyDataMsg:&\n\003foo\022\031."
  76. "oe.recorder.pb.MarkerMsg\030d \001(\r", 270);
  77. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  78. "xrecorder/protobuf/DataRecord.proto", &protobuf_RegisterTypes);
  79. MyDataMsg::default_instance_ = new MyDataMsg();
  80. ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension(
  81. &::oe::recorder::pb::DataRecord::default_instance(),
  82. 1000, 11, false, false,
  83. &::oe::xrecorder::pb::MyDataMsg::default_instance());
  84. ::google::protobuf::internal::ExtensionSet::RegisterExtension(
  85. &::oe::recorder::pb::MarkerMsg::default_instance(),
  86. 100, 13, false, false);
  87. MyDataMsg::default_instance_->InitAsDefaultInstance();
  88. ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_xrecorder_2fprotobuf_2fDataRecord_2eproto);
  89. }
  90. // Force AddDescriptors() to be called at static initialization time.
  91. struct StaticDescriptorInitializer_xrecorder_2fprotobuf_2fDataRecord_2eproto {
  92. StaticDescriptorInitializer_xrecorder_2fprotobuf_2fDataRecord_2eproto() {
  93. protobuf_AddDesc_xrecorder_2fprotobuf_2fDataRecord_2eproto();
  94. }
  95. } static_descriptor_initializer_xrecorder_2fprotobuf_2fDataRecord_2eproto_;
  96. // ===================================================================
  97. #ifndef _MSC_VER
  98. const int MyDataMsg::kFeeFieldNumber;
  99. const int MyDataMsg::kFiFieldNumber;
  100. const int MyDataMsg::kFoFieldNumber;
  101. #endif // !_MSC_VER
  102. MyDataMsg::MyDataMsg()
  103. : ::google::protobuf::Message() {
  104. SharedCtor();
  105. // @@protoc_insertion_point(constructor:oe.xrecorder.pb.MyDataMsg)
  106. }
  107. void MyDataMsg::InitAsDefaultInstance() {
  108. }
  109. MyDataMsg::MyDataMsg(const MyDataMsg& from)
  110. : ::google::protobuf::Message() {
  111. SharedCtor();
  112. MergeFrom(from);
  113. // @@protoc_insertion_point(copy_constructor:oe.xrecorder.pb.MyDataMsg)
  114. }
  115. void MyDataMsg::SharedCtor() {
  116. _cached_size_ = 0;
  117. fee_ = 0u;
  118. fi_ = 0u;
  119. fo_ = 0u;
  120. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  121. }
  122. MyDataMsg::~MyDataMsg() {
  123. // @@protoc_insertion_point(destructor:oe.xrecorder.pb.MyDataMsg)
  124. SharedDtor();
  125. }
  126. void MyDataMsg::SharedDtor() {
  127. if (this != default_instance_) {
  128. }
  129. }
  130. void MyDataMsg::SetCachedSize(int size) const {
  131. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  132. _cached_size_ = size;
  133. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  134. }
  135. const ::google::protobuf::Descriptor* MyDataMsg::descriptor() {
  136. protobuf_AssignDescriptorsOnce();
  137. return MyDataMsg_descriptor_;
  138. }
  139. const MyDataMsg& MyDataMsg::default_instance() {
  140. if (default_instance_ == NULL) protobuf_AddDesc_xrecorder_2fprotobuf_2fDataRecord_2eproto();
  141. return *default_instance_;
  142. }
  143. MyDataMsg* MyDataMsg::default_instance_ = NULL;
  144. MyDataMsg* MyDataMsg::New() const {
  145. return new MyDataMsg;
  146. }
  147. void MyDataMsg::Clear() {
  148. #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
  149. &reinterpret_cast<MyDataMsg*>(16)->f) - \
  150. reinterpret_cast<char*>(16))
  151. #define ZR_(first, last) do { \
  152. size_t f = OFFSET_OF_FIELD_(first); \
  153. size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
  154. ::memset(&first, 0, n); \
  155. } while (0)
  156. ZR_(fee_, fo_);
  157. #undef OFFSET_OF_FIELD_
  158. #undef ZR_
  159. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  160. mutable_unknown_fields()->Clear();
  161. }
  162. bool MyDataMsg::MergePartialFromCodedStream(
  163. ::google::protobuf::io::CodedInputStream* input) {
  164. #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
  165. ::google::protobuf::uint32 tag;
  166. // @@protoc_insertion_point(parse_start:oe.xrecorder.pb.MyDataMsg)
  167. for (;;) {
  168. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
  169. tag = p.first;
  170. if (!p.second) goto handle_unusual;
  171. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  172. // required uint32 fee = 1;
  173. case 1: {
  174. if (tag == 8) {
  175. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  176. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  177. input, &fee_)));
  178. set_has_fee();
  179. } else {
  180. goto handle_unusual;
  181. }
  182. if (input->ExpectTag(16)) goto parse_fi;
  183. break;
  184. }
  185. // required uint32 fi = 2;
  186. case 2: {
  187. if (tag == 16) {
  188. parse_fi:
  189. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  190. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  191. input, &fi_)));
  192. set_has_fi();
  193. } else {
  194. goto handle_unusual;
  195. }
  196. if (input->ExpectTag(24)) goto parse_fo;
  197. break;
  198. }
  199. // required uint32 fo = 3;
  200. case 3: {
  201. if (tag == 24) {
  202. parse_fo:
  203. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  204. ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  205. input, &fo_)));
  206. set_has_fo();
  207. } else {
  208. goto handle_unusual;
  209. }
  210. if (input->ExpectAtEnd()) goto success;
  211. break;
  212. }
  213. default: {
  214. handle_unusual:
  215. if (tag == 0 ||
  216. ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  217. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  218. goto success;
  219. }
  220. DO_(::google::protobuf::internal::WireFormat::SkipField(
  221. input, tag, mutable_unknown_fields()));
  222. break;
  223. }
  224. }
  225. }
  226. success:
  227. // @@protoc_insertion_point(parse_success:oe.xrecorder.pb.MyDataMsg)
  228. return true;
  229. failure:
  230. // @@protoc_insertion_point(parse_failure:oe.xrecorder.pb.MyDataMsg)
  231. return false;
  232. #undef DO_
  233. }
  234. void MyDataMsg::SerializeWithCachedSizes(
  235. ::google::protobuf::io::CodedOutputStream* output) const {
  236. // @@protoc_insertion_point(serialize_start:oe.xrecorder.pb.MyDataMsg)
  237. // required uint32 fee = 1;
  238. if (has_fee()) {
  239. ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->fee(), output);
  240. }
  241. // required uint32 fi = 2;
  242. if (has_fi()) {
  243. ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->fi(), output);
  244. }
  245. // required uint32 fo = 3;
  246. if (has_fo()) {
  247. ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->fo(), output);
  248. }
  249. if (!unknown_fields().empty()) {
  250. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  251. unknown_fields(), output);
  252. }
  253. // @@protoc_insertion_point(serialize_end:oe.xrecorder.pb.MyDataMsg)
  254. }
  255. ::google::protobuf::uint8* MyDataMsg::SerializeWithCachedSizesToArray(
  256. ::google::protobuf::uint8* target) const {
  257. // @@protoc_insertion_point(serialize_to_array_start:oe.xrecorder.pb.MyDataMsg)
  258. // required uint32 fee = 1;
  259. if (has_fee()) {
  260. target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->fee(), target);
  261. }
  262. // required uint32 fi = 2;
  263. if (has_fi()) {
  264. target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->fi(), target);
  265. }
  266. // required uint32 fo = 3;
  267. if (has_fo()) {
  268. target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->fo(), target);
  269. }
  270. if (!unknown_fields().empty()) {
  271. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  272. unknown_fields(), target);
  273. }
  274. // @@protoc_insertion_point(serialize_to_array_end:oe.xrecorder.pb.MyDataMsg)
  275. return target;
  276. }
  277. int MyDataMsg::ByteSize() const {
  278. int total_size = 0;
  279. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  280. // required uint32 fee = 1;
  281. if (has_fee()) {
  282. total_size += 1 +
  283. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  284. this->fee());
  285. }
  286. // required uint32 fi = 2;
  287. if (has_fi()) {
  288. total_size += 1 +
  289. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  290. this->fi());
  291. }
  292. // required uint32 fo = 3;
  293. if (has_fo()) {
  294. total_size += 1 +
  295. ::google::protobuf::internal::WireFormatLite::UInt32Size(
  296. this->fo());
  297. }
  298. }
  299. if (!unknown_fields().empty()) {
  300. total_size +=
  301. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  302. unknown_fields());
  303. }
  304. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  305. _cached_size_ = total_size;
  306. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  307. return total_size;
  308. }
  309. void MyDataMsg::MergeFrom(const ::google::protobuf::Message& from) {
  310. GOOGLE_CHECK_NE(&from, this);
  311. const MyDataMsg* source =
  312. ::google::protobuf::internal::dynamic_cast_if_available<const MyDataMsg*>(
  313. &from);
  314. if (source == NULL) {
  315. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  316. } else {
  317. MergeFrom(*source);
  318. }
  319. }
  320. void MyDataMsg::MergeFrom(const MyDataMsg& from) {
  321. GOOGLE_CHECK_NE(&from, this);
  322. if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  323. if (from.has_fee()) {
  324. set_fee(from.fee());
  325. }
  326. if (from.has_fi()) {
  327. set_fi(from.fi());
  328. }
  329. if (from.has_fo()) {
  330. set_fo(from.fo());
  331. }
  332. }
  333. mutable_unknown_fields()->MergeFrom(from.unknown_fields());
  334. }
  335. void MyDataMsg::CopyFrom(const ::google::protobuf::Message& from) {
  336. if (&from == this) return;
  337. Clear();
  338. MergeFrom(from);
  339. }
  340. void MyDataMsg::CopyFrom(const MyDataMsg& from) {
  341. if (&from == this) return;
  342. Clear();
  343. MergeFrom(from);
  344. }
  345. bool MyDataMsg::IsInitialized() const {
  346. if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
  347. return true;
  348. }
  349. void MyDataMsg::Swap(MyDataMsg* other) {
  350. if (other != this) {
  351. std::swap(fee_, other->fee_);
  352. std::swap(fi_, other->fi_);
  353. std::swap(fo_, other->fo_);
  354. std::swap(_has_bits_[0], other->_has_bits_[0]);
  355. _unknown_fields_.Swap(&other->_unknown_fields_);
  356. std::swap(_cached_size_, other->_cached_size_);
  357. }
  358. }
  359. ::google::protobuf::Metadata MyDataMsg::GetMetadata() const {
  360. protobuf_AssignDescriptorsOnce();
  361. ::google::protobuf::Metadata metadata;
  362. metadata.descriptor = MyDataMsg_descriptor_;
  363. metadata.reflection = MyDataMsg_reflection_;
  364. return metadata;
  365. }
  366. ::google::protobuf::internal::ExtensionIdentifier< ::oe::recorder::pb::DataRecord,
  367. ::google::protobuf::internal::MessageTypeTraits< ::oe::xrecorder::pb::MyDataMsg >, 11, false >
  368. my_data_msg(kMyDataMsgFieldNumber, ::oe::xrecorder::pb::MyDataMsg::default_instance());
  369. ::google::protobuf::internal::ExtensionIdentifier< ::oe::recorder::pb::MarkerMsg,
  370. ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false >
  371. foo(kFooFieldNumber, 0u);
  372. // @@protoc_insertion_point(namespace_scope)
  373. } // namespace pb
  374. } // namespace xrecorder
  375. } // namespace oe
  376. // @@protoc_insertion_point(global_scope)