hardware_limit.pb.cc 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: hardware_limit.proto
  3. #include "hardware_limit.pb.h"
  4. #include <algorithm>
  5. #include <google/protobuf/stubs/common.h>
  6. #include <google/protobuf/stubs/port.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. // This is a temporary google only hack
  15. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  16. #include "third_party/protobuf/version.h"
  17. #endif
  18. // @@protoc_insertion_point(includes)
  19. namespace Hardware_limit {
  20. class RailingDefaultTypeInternal {
  21. public:
  22. ::google::protobuf::internal::ExplicitlyConstructed<Railing>
  23. _instance;
  24. } _Railing_default_instance_;
  25. class Theta_rangeDefaultTypeInternal {
  26. public:
  27. ::google::protobuf::internal::ExplicitlyConstructed<Theta_range>
  28. _instance;
  29. } _Theta_range_default_instance_;
  30. class Hardware_parameterDefaultTypeInternal {
  31. public:
  32. ::google::protobuf::internal::ExplicitlyConstructed<Hardware_parameter>
  33. _instance;
  34. } _Hardware_parameter_default_instance_;
  35. } // namespace Hardware_limit
  36. namespace protobuf_hardware_5flimit_2eproto {
  37. void InitDefaultsRailingImpl() {
  38. GOOGLE_PROTOBUF_VERIFY_VERSION;
  39. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  40. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  41. #else
  42. ::google::protobuf::internal::InitProtobufDefaults();
  43. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  44. {
  45. void* ptr = &::Hardware_limit::_Railing_default_instance_;
  46. new (ptr) ::Hardware_limit::Railing();
  47. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  48. }
  49. ::Hardware_limit::Railing::InitAsDefaultInstance();
  50. }
  51. void InitDefaultsRailing() {
  52. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  53. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsRailingImpl);
  54. }
  55. void InitDefaultsTheta_rangeImpl() {
  56. GOOGLE_PROTOBUF_VERIFY_VERSION;
  57. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  58. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  59. #else
  60. ::google::protobuf::internal::InitProtobufDefaults();
  61. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  62. {
  63. void* ptr = &::Hardware_limit::_Theta_range_default_instance_;
  64. new (ptr) ::Hardware_limit::Theta_range();
  65. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  66. }
  67. ::Hardware_limit::Theta_range::InitAsDefaultInstance();
  68. }
  69. void InitDefaultsTheta_range() {
  70. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  71. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTheta_rangeImpl);
  72. }
  73. void InitDefaultsHardware_parameterImpl() {
  74. GOOGLE_PROTOBUF_VERIFY_VERSION;
  75. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  76. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  77. #else
  78. ::google::protobuf::internal::InitProtobufDefaults();
  79. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  80. protobuf_hardware_5flimit_2eproto::InitDefaultsRailing();
  81. protobuf_hardware_5flimit_2eproto::InitDefaultsTheta_range();
  82. {
  83. void* ptr = &::Hardware_limit::_Hardware_parameter_default_instance_;
  84. new (ptr) ::Hardware_limit::Hardware_parameter();
  85. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  86. }
  87. ::Hardware_limit::Hardware_parameter::InitAsDefaultInstance();
  88. }
  89. void InitDefaultsHardware_parameter() {
  90. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  91. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsHardware_parameterImpl);
  92. }
  93. ::google::protobuf::Metadata file_level_metadata[3];
  94. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  95. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Railing, _has_bits_),
  96. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Railing, _internal_metadata_),
  97. ~0u, // no _extensions_
  98. ~0u, // no _oneof_case_
  99. ~0u, // no _weak_field_map_
  100. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Railing, pa_),
  101. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Railing, pb_),
  102. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Railing, pc_),
  103. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Railing, railing_width_),
  104. 0,
  105. 1,
  106. 2,
  107. 3,
  108. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Theta_range, _has_bits_),
  109. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Theta_range, _internal_metadata_),
  110. ~0u, // no _extensions_
  111. ~0u, // no _oneof_case_
  112. ~0u, // no _weak_field_map_
  113. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Theta_range, min_theta_),
  114. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Theta_range, max_theta_),
  115. 0,
  116. 1,
  117. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Hardware_parameter, _has_bits_),
  118. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Hardware_parameter, _internal_metadata_),
  119. ~0u, // no _extensions_
  120. ~0u, // no _oneof_case_
  121. ~0u, // no _weak_field_map_
  122. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Hardware_parameter, railing_parameter_),
  123. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Hardware_parameter, center_min_y_),
  124. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Hardware_parameter, center_max_y_),
  125. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Hardware_parameter, center_min_x_),
  126. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Hardware_parameter, center_max_x_),
  127. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Hardware_parameter, corner_min_y_),
  128. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Hardware_parameter, corner_max_y_),
  129. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Hardware_parameter, theta_range_),
  130. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Hardware_limit::Hardware_parameter, height_),
  131. ~0u,
  132. 0,
  133. 1,
  134. 2,
  135. 3,
  136. 4,
  137. 5,
  138. ~0u,
  139. 6,
  140. };
  141. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  142. { 0, 9, sizeof(::Hardware_limit::Railing)},
  143. { 13, 20, sizeof(::Hardware_limit::Theta_range)},
  144. { 22, 36, sizeof(::Hardware_limit::Hardware_parameter)},
  145. };
  146. static ::google::protobuf::Message const * const file_default_instances[] = {
  147. reinterpret_cast<const ::google::protobuf::Message*>(&::Hardware_limit::_Railing_default_instance_),
  148. reinterpret_cast<const ::google::protobuf::Message*>(&::Hardware_limit::_Theta_range_default_instance_),
  149. reinterpret_cast<const ::google::protobuf::Message*>(&::Hardware_limit::_Hardware_parameter_default_instance_),
  150. };
  151. void protobuf_AssignDescriptors() {
  152. AddDescriptors();
  153. ::google::protobuf::MessageFactory* factory = NULL;
  154. AssignDescriptors(
  155. "hardware_limit.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  156. file_level_metadata, NULL, NULL);
  157. }
  158. void protobuf_AssignDescriptorsOnce() {
  159. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  160. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  161. }
  162. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  163. void protobuf_RegisterTypes(const ::std::string&) {
  164. protobuf_AssignDescriptorsOnce();
  165. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3);
  166. }
  167. void AddDescriptorsImpl() {
  168. InitDefaults();
  169. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  170. "\n\024hardware_limit.proto\022\016Hardware_limit\"G"
  171. "\n\007Railing\022\n\n\002pa\030\001 \002(\002\022\n\n\002pb\030\002 \002(\002\022\n\n\002pc\030"
  172. "\003 \002(\002\022\030\n\rrailing_width\030\004 \001(\002:\0010\"3\n\013Theta"
  173. "_range\022\021\n\tmin_theta\030\001 \002(\002\022\021\n\tmax_theta\030\002"
  174. " \002(\002\"\216\002\n\022Hardware_parameter\0222\n\021railing_p"
  175. "arameter\030\001 \003(\0132\027.Hardware_limit.Railing\022"
  176. "\024\n\014center_min_y\030\002 \002(\002\022\024\n\014center_max_y\030\003 "
  177. "\002(\002\022\024\n\014center_min_x\030\004 \002(\002\022\024\n\014center_max_"
  178. "x\030\005 \002(\002\022\024\n\014corner_min_y\030\006 \002(\002\022\024\n\014corner_"
  179. "max_y\030\007 \002(\002\0220\n\013theta_range\030\010 \003(\0132\033.Hardw"
  180. "are_limit.Theta_range\022\016\n\006height\030\t \002(\002"
  181. };
  182. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  183. descriptor, 437);
  184. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  185. "hardware_limit.proto", &protobuf_RegisterTypes);
  186. }
  187. void AddDescriptors() {
  188. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  189. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  190. }
  191. // Force AddDescriptors() to be called at dynamic initialization time.
  192. struct StaticDescriptorInitializer {
  193. StaticDescriptorInitializer() {
  194. AddDescriptors();
  195. }
  196. } static_descriptor_initializer;
  197. } // namespace protobuf_hardware_5flimit_2eproto
  198. namespace Hardware_limit {
  199. // ===================================================================
  200. void Railing::InitAsDefaultInstance() {
  201. }
  202. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  203. const int Railing::kPaFieldNumber;
  204. const int Railing::kPbFieldNumber;
  205. const int Railing::kPcFieldNumber;
  206. const int Railing::kRailingWidthFieldNumber;
  207. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  208. Railing::Railing()
  209. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  210. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  211. ::protobuf_hardware_5flimit_2eproto::InitDefaultsRailing();
  212. }
  213. SharedCtor();
  214. // @@protoc_insertion_point(constructor:Hardware_limit.Railing)
  215. }
  216. Railing::Railing(const Railing& from)
  217. : ::google::protobuf::Message(),
  218. _internal_metadata_(NULL),
  219. _has_bits_(from._has_bits_),
  220. _cached_size_(0) {
  221. _internal_metadata_.MergeFrom(from._internal_metadata_);
  222. ::memcpy(&pa_, &from.pa_,
  223. static_cast<size_t>(reinterpret_cast<char*>(&railing_width_) -
  224. reinterpret_cast<char*>(&pa_)) + sizeof(railing_width_));
  225. // @@protoc_insertion_point(copy_constructor:Hardware_limit.Railing)
  226. }
  227. void Railing::SharedCtor() {
  228. _cached_size_ = 0;
  229. ::memset(&pa_, 0, static_cast<size_t>(
  230. reinterpret_cast<char*>(&railing_width_) -
  231. reinterpret_cast<char*>(&pa_)) + sizeof(railing_width_));
  232. }
  233. Railing::~Railing() {
  234. // @@protoc_insertion_point(destructor:Hardware_limit.Railing)
  235. SharedDtor();
  236. }
  237. void Railing::SharedDtor() {
  238. }
  239. void Railing::SetCachedSize(int size) const {
  240. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  241. _cached_size_ = size;
  242. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  243. }
  244. const ::google::protobuf::Descriptor* Railing::descriptor() {
  245. ::protobuf_hardware_5flimit_2eproto::protobuf_AssignDescriptorsOnce();
  246. return ::protobuf_hardware_5flimit_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  247. }
  248. const Railing& Railing::default_instance() {
  249. ::protobuf_hardware_5flimit_2eproto::InitDefaultsRailing();
  250. return *internal_default_instance();
  251. }
  252. Railing* Railing::New(::google::protobuf::Arena* arena) const {
  253. Railing* n = new Railing;
  254. if (arena != NULL) {
  255. arena->Own(n);
  256. }
  257. return n;
  258. }
  259. void Railing::Clear() {
  260. // @@protoc_insertion_point(message_clear_start:Hardware_limit.Railing)
  261. ::google::protobuf::uint32 cached_has_bits = 0;
  262. // Prevent compiler warnings about cached_has_bits being unused
  263. (void) cached_has_bits;
  264. cached_has_bits = _has_bits_[0];
  265. if (cached_has_bits & 15u) {
  266. ::memset(&pa_, 0, static_cast<size_t>(
  267. reinterpret_cast<char*>(&railing_width_) -
  268. reinterpret_cast<char*>(&pa_)) + sizeof(railing_width_));
  269. }
  270. _has_bits_.Clear();
  271. _internal_metadata_.Clear();
  272. }
  273. bool Railing::MergePartialFromCodedStream(
  274. ::google::protobuf::io::CodedInputStream* input) {
  275. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  276. ::google::protobuf::uint32 tag;
  277. // @@protoc_insertion_point(parse_start:Hardware_limit.Railing)
  278. for (;;) {
  279. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  280. tag = p.first;
  281. if (!p.second) goto handle_unusual;
  282. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  283. // required float pa = 1;
  284. case 1: {
  285. if (static_cast< ::google::protobuf::uint8>(tag) ==
  286. static_cast< ::google::protobuf::uint8>(13u /* 13 & 0xFF */)) {
  287. set_has_pa();
  288. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  289. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  290. input, &pa_)));
  291. } else {
  292. goto handle_unusual;
  293. }
  294. break;
  295. }
  296. // required float pb = 2;
  297. case 2: {
  298. if (static_cast< ::google::protobuf::uint8>(tag) ==
  299. static_cast< ::google::protobuf::uint8>(21u /* 21 & 0xFF */)) {
  300. set_has_pb();
  301. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  302. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  303. input, &pb_)));
  304. } else {
  305. goto handle_unusual;
  306. }
  307. break;
  308. }
  309. // required float pc = 3;
  310. case 3: {
  311. if (static_cast< ::google::protobuf::uint8>(tag) ==
  312. static_cast< ::google::protobuf::uint8>(29u /* 29 & 0xFF */)) {
  313. set_has_pc();
  314. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  315. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  316. input, &pc_)));
  317. } else {
  318. goto handle_unusual;
  319. }
  320. break;
  321. }
  322. // optional float railing_width = 4 [default = 0];
  323. case 4: {
  324. if (static_cast< ::google::protobuf::uint8>(tag) ==
  325. static_cast< ::google::protobuf::uint8>(37u /* 37 & 0xFF */)) {
  326. set_has_railing_width();
  327. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  328. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  329. input, &railing_width_)));
  330. } else {
  331. goto handle_unusual;
  332. }
  333. break;
  334. }
  335. default: {
  336. handle_unusual:
  337. if (tag == 0) {
  338. goto success;
  339. }
  340. DO_(::google::protobuf::internal::WireFormat::SkipField(
  341. input, tag, _internal_metadata_.mutable_unknown_fields()));
  342. break;
  343. }
  344. }
  345. }
  346. success:
  347. // @@protoc_insertion_point(parse_success:Hardware_limit.Railing)
  348. return true;
  349. failure:
  350. // @@protoc_insertion_point(parse_failure:Hardware_limit.Railing)
  351. return false;
  352. #undef DO_
  353. }
  354. void Railing::SerializeWithCachedSizes(
  355. ::google::protobuf::io::CodedOutputStream* output) const {
  356. // @@protoc_insertion_point(serialize_start:Hardware_limit.Railing)
  357. ::google::protobuf::uint32 cached_has_bits = 0;
  358. (void) cached_has_bits;
  359. cached_has_bits = _has_bits_[0];
  360. // required float pa = 1;
  361. if (cached_has_bits & 0x00000001u) {
  362. ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->pa(), output);
  363. }
  364. // required float pb = 2;
  365. if (cached_has_bits & 0x00000002u) {
  366. ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->pb(), output);
  367. }
  368. // required float pc = 3;
  369. if (cached_has_bits & 0x00000004u) {
  370. ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->pc(), output);
  371. }
  372. // optional float railing_width = 4 [default = 0];
  373. if (cached_has_bits & 0x00000008u) {
  374. ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->railing_width(), output);
  375. }
  376. if (_internal_metadata_.have_unknown_fields()) {
  377. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  378. _internal_metadata_.unknown_fields(), output);
  379. }
  380. // @@protoc_insertion_point(serialize_end:Hardware_limit.Railing)
  381. }
  382. ::google::protobuf::uint8* Railing::InternalSerializeWithCachedSizesToArray(
  383. bool deterministic, ::google::protobuf::uint8* target) const {
  384. (void)deterministic; // Unused
  385. // @@protoc_insertion_point(serialize_to_array_start:Hardware_limit.Railing)
  386. ::google::protobuf::uint32 cached_has_bits = 0;
  387. (void) cached_has_bits;
  388. cached_has_bits = _has_bits_[0];
  389. // required float pa = 1;
  390. if (cached_has_bits & 0x00000001u) {
  391. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->pa(), target);
  392. }
  393. // required float pb = 2;
  394. if (cached_has_bits & 0x00000002u) {
  395. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->pb(), target);
  396. }
  397. // required float pc = 3;
  398. if (cached_has_bits & 0x00000004u) {
  399. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->pc(), target);
  400. }
  401. // optional float railing_width = 4 [default = 0];
  402. if (cached_has_bits & 0x00000008u) {
  403. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->railing_width(), target);
  404. }
  405. if (_internal_metadata_.have_unknown_fields()) {
  406. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  407. _internal_metadata_.unknown_fields(), target);
  408. }
  409. // @@protoc_insertion_point(serialize_to_array_end:Hardware_limit.Railing)
  410. return target;
  411. }
  412. size_t Railing::RequiredFieldsByteSizeFallback() const {
  413. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:Hardware_limit.Railing)
  414. size_t total_size = 0;
  415. if (has_pa()) {
  416. // required float pa = 1;
  417. total_size += 1 + 4;
  418. }
  419. if (has_pb()) {
  420. // required float pb = 2;
  421. total_size += 1 + 4;
  422. }
  423. if (has_pc()) {
  424. // required float pc = 3;
  425. total_size += 1 + 4;
  426. }
  427. return total_size;
  428. }
  429. size_t Railing::ByteSizeLong() const {
  430. // @@protoc_insertion_point(message_byte_size_start:Hardware_limit.Railing)
  431. size_t total_size = 0;
  432. if (_internal_metadata_.have_unknown_fields()) {
  433. total_size +=
  434. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  435. _internal_metadata_.unknown_fields());
  436. }
  437. if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present.
  438. // required float pa = 1;
  439. total_size += 1 + 4;
  440. // required float pb = 2;
  441. total_size += 1 + 4;
  442. // required float pc = 3;
  443. total_size += 1 + 4;
  444. } else {
  445. total_size += RequiredFieldsByteSizeFallback();
  446. }
  447. // optional float railing_width = 4 [default = 0];
  448. if (has_railing_width()) {
  449. total_size += 1 + 4;
  450. }
  451. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  452. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  453. _cached_size_ = cached_size;
  454. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  455. return total_size;
  456. }
  457. void Railing::MergeFrom(const ::google::protobuf::Message& from) {
  458. // @@protoc_insertion_point(generalized_merge_from_start:Hardware_limit.Railing)
  459. GOOGLE_DCHECK_NE(&from, this);
  460. const Railing* source =
  461. ::google::protobuf::internal::DynamicCastToGenerated<const Railing>(
  462. &from);
  463. if (source == NULL) {
  464. // @@protoc_insertion_point(generalized_merge_from_cast_fail:Hardware_limit.Railing)
  465. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  466. } else {
  467. // @@protoc_insertion_point(generalized_merge_from_cast_success:Hardware_limit.Railing)
  468. MergeFrom(*source);
  469. }
  470. }
  471. void Railing::MergeFrom(const Railing& from) {
  472. // @@protoc_insertion_point(class_specific_merge_from_start:Hardware_limit.Railing)
  473. GOOGLE_DCHECK_NE(&from, this);
  474. _internal_metadata_.MergeFrom(from._internal_metadata_);
  475. ::google::protobuf::uint32 cached_has_bits = 0;
  476. (void) cached_has_bits;
  477. cached_has_bits = from._has_bits_[0];
  478. if (cached_has_bits & 15u) {
  479. if (cached_has_bits & 0x00000001u) {
  480. pa_ = from.pa_;
  481. }
  482. if (cached_has_bits & 0x00000002u) {
  483. pb_ = from.pb_;
  484. }
  485. if (cached_has_bits & 0x00000004u) {
  486. pc_ = from.pc_;
  487. }
  488. if (cached_has_bits & 0x00000008u) {
  489. railing_width_ = from.railing_width_;
  490. }
  491. _has_bits_[0] |= cached_has_bits;
  492. }
  493. }
  494. void Railing::CopyFrom(const ::google::protobuf::Message& from) {
  495. // @@protoc_insertion_point(generalized_copy_from_start:Hardware_limit.Railing)
  496. if (&from == this) return;
  497. Clear();
  498. MergeFrom(from);
  499. }
  500. void Railing::CopyFrom(const Railing& from) {
  501. // @@protoc_insertion_point(class_specific_copy_from_start:Hardware_limit.Railing)
  502. if (&from == this) return;
  503. Clear();
  504. MergeFrom(from);
  505. }
  506. bool Railing::IsInitialized() const {
  507. if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
  508. return true;
  509. }
  510. void Railing::Swap(Railing* other) {
  511. if (other == this) return;
  512. InternalSwap(other);
  513. }
  514. void Railing::InternalSwap(Railing* other) {
  515. using std::swap;
  516. swap(pa_, other->pa_);
  517. swap(pb_, other->pb_);
  518. swap(pc_, other->pc_);
  519. swap(railing_width_, other->railing_width_);
  520. swap(_has_bits_[0], other->_has_bits_[0]);
  521. _internal_metadata_.Swap(&other->_internal_metadata_);
  522. swap(_cached_size_, other->_cached_size_);
  523. }
  524. ::google::protobuf::Metadata Railing::GetMetadata() const {
  525. protobuf_hardware_5flimit_2eproto::protobuf_AssignDescriptorsOnce();
  526. return ::protobuf_hardware_5flimit_2eproto::file_level_metadata[kIndexInFileMessages];
  527. }
  528. // ===================================================================
  529. void Theta_range::InitAsDefaultInstance() {
  530. }
  531. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  532. const int Theta_range::kMinThetaFieldNumber;
  533. const int Theta_range::kMaxThetaFieldNumber;
  534. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  535. Theta_range::Theta_range()
  536. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  537. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  538. ::protobuf_hardware_5flimit_2eproto::InitDefaultsTheta_range();
  539. }
  540. SharedCtor();
  541. // @@protoc_insertion_point(constructor:Hardware_limit.Theta_range)
  542. }
  543. Theta_range::Theta_range(const Theta_range& from)
  544. : ::google::protobuf::Message(),
  545. _internal_metadata_(NULL),
  546. _has_bits_(from._has_bits_),
  547. _cached_size_(0) {
  548. _internal_metadata_.MergeFrom(from._internal_metadata_);
  549. ::memcpy(&min_theta_, &from.min_theta_,
  550. static_cast<size_t>(reinterpret_cast<char*>(&max_theta_) -
  551. reinterpret_cast<char*>(&min_theta_)) + sizeof(max_theta_));
  552. // @@protoc_insertion_point(copy_constructor:Hardware_limit.Theta_range)
  553. }
  554. void Theta_range::SharedCtor() {
  555. _cached_size_ = 0;
  556. ::memset(&min_theta_, 0, static_cast<size_t>(
  557. reinterpret_cast<char*>(&max_theta_) -
  558. reinterpret_cast<char*>(&min_theta_)) + sizeof(max_theta_));
  559. }
  560. Theta_range::~Theta_range() {
  561. // @@protoc_insertion_point(destructor:Hardware_limit.Theta_range)
  562. SharedDtor();
  563. }
  564. void Theta_range::SharedDtor() {
  565. }
  566. void Theta_range::SetCachedSize(int size) const {
  567. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  568. _cached_size_ = size;
  569. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  570. }
  571. const ::google::protobuf::Descriptor* Theta_range::descriptor() {
  572. ::protobuf_hardware_5flimit_2eproto::protobuf_AssignDescriptorsOnce();
  573. return ::protobuf_hardware_5flimit_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  574. }
  575. const Theta_range& Theta_range::default_instance() {
  576. ::protobuf_hardware_5flimit_2eproto::InitDefaultsTheta_range();
  577. return *internal_default_instance();
  578. }
  579. Theta_range* Theta_range::New(::google::protobuf::Arena* arena) const {
  580. Theta_range* n = new Theta_range;
  581. if (arena != NULL) {
  582. arena->Own(n);
  583. }
  584. return n;
  585. }
  586. void Theta_range::Clear() {
  587. // @@protoc_insertion_point(message_clear_start:Hardware_limit.Theta_range)
  588. ::google::protobuf::uint32 cached_has_bits = 0;
  589. // Prevent compiler warnings about cached_has_bits being unused
  590. (void) cached_has_bits;
  591. cached_has_bits = _has_bits_[0];
  592. if (cached_has_bits & 3u) {
  593. ::memset(&min_theta_, 0, static_cast<size_t>(
  594. reinterpret_cast<char*>(&max_theta_) -
  595. reinterpret_cast<char*>(&min_theta_)) + sizeof(max_theta_));
  596. }
  597. _has_bits_.Clear();
  598. _internal_metadata_.Clear();
  599. }
  600. bool Theta_range::MergePartialFromCodedStream(
  601. ::google::protobuf::io::CodedInputStream* input) {
  602. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  603. ::google::protobuf::uint32 tag;
  604. // @@protoc_insertion_point(parse_start:Hardware_limit.Theta_range)
  605. for (;;) {
  606. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  607. tag = p.first;
  608. if (!p.second) goto handle_unusual;
  609. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  610. // required float min_theta = 1;
  611. case 1: {
  612. if (static_cast< ::google::protobuf::uint8>(tag) ==
  613. static_cast< ::google::protobuf::uint8>(13u /* 13 & 0xFF */)) {
  614. set_has_min_theta();
  615. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  616. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  617. input, &min_theta_)));
  618. } else {
  619. goto handle_unusual;
  620. }
  621. break;
  622. }
  623. // required float max_theta = 2;
  624. case 2: {
  625. if (static_cast< ::google::protobuf::uint8>(tag) ==
  626. static_cast< ::google::protobuf::uint8>(21u /* 21 & 0xFF */)) {
  627. set_has_max_theta();
  628. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  629. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  630. input, &max_theta_)));
  631. } else {
  632. goto handle_unusual;
  633. }
  634. break;
  635. }
  636. default: {
  637. handle_unusual:
  638. if (tag == 0) {
  639. goto success;
  640. }
  641. DO_(::google::protobuf::internal::WireFormat::SkipField(
  642. input, tag, _internal_metadata_.mutable_unknown_fields()));
  643. break;
  644. }
  645. }
  646. }
  647. success:
  648. // @@protoc_insertion_point(parse_success:Hardware_limit.Theta_range)
  649. return true;
  650. failure:
  651. // @@protoc_insertion_point(parse_failure:Hardware_limit.Theta_range)
  652. return false;
  653. #undef DO_
  654. }
  655. void Theta_range::SerializeWithCachedSizes(
  656. ::google::protobuf::io::CodedOutputStream* output) const {
  657. // @@protoc_insertion_point(serialize_start:Hardware_limit.Theta_range)
  658. ::google::protobuf::uint32 cached_has_bits = 0;
  659. (void) cached_has_bits;
  660. cached_has_bits = _has_bits_[0];
  661. // required float min_theta = 1;
  662. if (cached_has_bits & 0x00000001u) {
  663. ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->min_theta(), output);
  664. }
  665. // required float max_theta = 2;
  666. if (cached_has_bits & 0x00000002u) {
  667. ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->max_theta(), output);
  668. }
  669. if (_internal_metadata_.have_unknown_fields()) {
  670. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  671. _internal_metadata_.unknown_fields(), output);
  672. }
  673. // @@protoc_insertion_point(serialize_end:Hardware_limit.Theta_range)
  674. }
  675. ::google::protobuf::uint8* Theta_range::InternalSerializeWithCachedSizesToArray(
  676. bool deterministic, ::google::protobuf::uint8* target) const {
  677. (void)deterministic; // Unused
  678. // @@protoc_insertion_point(serialize_to_array_start:Hardware_limit.Theta_range)
  679. ::google::protobuf::uint32 cached_has_bits = 0;
  680. (void) cached_has_bits;
  681. cached_has_bits = _has_bits_[0];
  682. // required float min_theta = 1;
  683. if (cached_has_bits & 0x00000001u) {
  684. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->min_theta(), target);
  685. }
  686. // required float max_theta = 2;
  687. if (cached_has_bits & 0x00000002u) {
  688. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->max_theta(), target);
  689. }
  690. if (_internal_metadata_.have_unknown_fields()) {
  691. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  692. _internal_metadata_.unknown_fields(), target);
  693. }
  694. // @@protoc_insertion_point(serialize_to_array_end:Hardware_limit.Theta_range)
  695. return target;
  696. }
  697. size_t Theta_range::RequiredFieldsByteSizeFallback() const {
  698. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:Hardware_limit.Theta_range)
  699. size_t total_size = 0;
  700. if (has_min_theta()) {
  701. // required float min_theta = 1;
  702. total_size += 1 + 4;
  703. }
  704. if (has_max_theta()) {
  705. // required float max_theta = 2;
  706. total_size += 1 + 4;
  707. }
  708. return total_size;
  709. }
  710. size_t Theta_range::ByteSizeLong() const {
  711. // @@protoc_insertion_point(message_byte_size_start:Hardware_limit.Theta_range)
  712. size_t total_size = 0;
  713. if (_internal_metadata_.have_unknown_fields()) {
  714. total_size +=
  715. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  716. _internal_metadata_.unknown_fields());
  717. }
  718. if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present.
  719. // required float min_theta = 1;
  720. total_size += 1 + 4;
  721. // required float max_theta = 2;
  722. total_size += 1 + 4;
  723. } else {
  724. total_size += RequiredFieldsByteSizeFallback();
  725. }
  726. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  727. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  728. _cached_size_ = cached_size;
  729. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  730. return total_size;
  731. }
  732. void Theta_range::MergeFrom(const ::google::protobuf::Message& from) {
  733. // @@protoc_insertion_point(generalized_merge_from_start:Hardware_limit.Theta_range)
  734. GOOGLE_DCHECK_NE(&from, this);
  735. const Theta_range* source =
  736. ::google::protobuf::internal::DynamicCastToGenerated<const Theta_range>(
  737. &from);
  738. if (source == NULL) {
  739. // @@protoc_insertion_point(generalized_merge_from_cast_fail:Hardware_limit.Theta_range)
  740. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  741. } else {
  742. // @@protoc_insertion_point(generalized_merge_from_cast_success:Hardware_limit.Theta_range)
  743. MergeFrom(*source);
  744. }
  745. }
  746. void Theta_range::MergeFrom(const Theta_range& from) {
  747. // @@protoc_insertion_point(class_specific_merge_from_start:Hardware_limit.Theta_range)
  748. GOOGLE_DCHECK_NE(&from, this);
  749. _internal_metadata_.MergeFrom(from._internal_metadata_);
  750. ::google::protobuf::uint32 cached_has_bits = 0;
  751. (void) cached_has_bits;
  752. cached_has_bits = from._has_bits_[0];
  753. if (cached_has_bits & 3u) {
  754. if (cached_has_bits & 0x00000001u) {
  755. min_theta_ = from.min_theta_;
  756. }
  757. if (cached_has_bits & 0x00000002u) {
  758. max_theta_ = from.max_theta_;
  759. }
  760. _has_bits_[0] |= cached_has_bits;
  761. }
  762. }
  763. void Theta_range::CopyFrom(const ::google::protobuf::Message& from) {
  764. // @@protoc_insertion_point(generalized_copy_from_start:Hardware_limit.Theta_range)
  765. if (&from == this) return;
  766. Clear();
  767. MergeFrom(from);
  768. }
  769. void Theta_range::CopyFrom(const Theta_range& from) {
  770. // @@protoc_insertion_point(class_specific_copy_from_start:Hardware_limit.Theta_range)
  771. if (&from == this) return;
  772. Clear();
  773. MergeFrom(from);
  774. }
  775. bool Theta_range::IsInitialized() const {
  776. if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
  777. return true;
  778. }
  779. void Theta_range::Swap(Theta_range* other) {
  780. if (other == this) return;
  781. InternalSwap(other);
  782. }
  783. void Theta_range::InternalSwap(Theta_range* other) {
  784. using std::swap;
  785. swap(min_theta_, other->min_theta_);
  786. swap(max_theta_, other->max_theta_);
  787. swap(_has_bits_[0], other->_has_bits_[0]);
  788. _internal_metadata_.Swap(&other->_internal_metadata_);
  789. swap(_cached_size_, other->_cached_size_);
  790. }
  791. ::google::protobuf::Metadata Theta_range::GetMetadata() const {
  792. protobuf_hardware_5flimit_2eproto::protobuf_AssignDescriptorsOnce();
  793. return ::protobuf_hardware_5flimit_2eproto::file_level_metadata[kIndexInFileMessages];
  794. }
  795. // ===================================================================
  796. void Hardware_parameter::InitAsDefaultInstance() {
  797. }
  798. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  799. const int Hardware_parameter::kRailingParameterFieldNumber;
  800. const int Hardware_parameter::kCenterMinYFieldNumber;
  801. const int Hardware_parameter::kCenterMaxYFieldNumber;
  802. const int Hardware_parameter::kCenterMinXFieldNumber;
  803. const int Hardware_parameter::kCenterMaxXFieldNumber;
  804. const int Hardware_parameter::kCornerMinYFieldNumber;
  805. const int Hardware_parameter::kCornerMaxYFieldNumber;
  806. const int Hardware_parameter::kThetaRangeFieldNumber;
  807. const int Hardware_parameter::kHeightFieldNumber;
  808. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  809. Hardware_parameter::Hardware_parameter()
  810. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  811. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  812. ::protobuf_hardware_5flimit_2eproto::InitDefaultsHardware_parameter();
  813. }
  814. SharedCtor();
  815. // @@protoc_insertion_point(constructor:Hardware_limit.Hardware_parameter)
  816. }
  817. Hardware_parameter::Hardware_parameter(const Hardware_parameter& from)
  818. : ::google::protobuf::Message(),
  819. _internal_metadata_(NULL),
  820. _has_bits_(from._has_bits_),
  821. _cached_size_(0),
  822. railing_parameter_(from.railing_parameter_),
  823. theta_range_(from.theta_range_) {
  824. _internal_metadata_.MergeFrom(from._internal_metadata_);
  825. ::memcpy(&center_min_y_, &from.center_min_y_,
  826. static_cast<size_t>(reinterpret_cast<char*>(&height_) -
  827. reinterpret_cast<char*>(&center_min_y_)) + sizeof(height_));
  828. // @@protoc_insertion_point(copy_constructor:Hardware_limit.Hardware_parameter)
  829. }
  830. void Hardware_parameter::SharedCtor() {
  831. _cached_size_ = 0;
  832. ::memset(&center_min_y_, 0, static_cast<size_t>(
  833. reinterpret_cast<char*>(&height_) -
  834. reinterpret_cast<char*>(&center_min_y_)) + sizeof(height_));
  835. }
  836. Hardware_parameter::~Hardware_parameter() {
  837. // @@protoc_insertion_point(destructor:Hardware_limit.Hardware_parameter)
  838. SharedDtor();
  839. }
  840. void Hardware_parameter::SharedDtor() {
  841. }
  842. void Hardware_parameter::SetCachedSize(int size) const {
  843. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  844. _cached_size_ = size;
  845. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  846. }
  847. const ::google::protobuf::Descriptor* Hardware_parameter::descriptor() {
  848. ::protobuf_hardware_5flimit_2eproto::protobuf_AssignDescriptorsOnce();
  849. return ::protobuf_hardware_5flimit_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  850. }
  851. const Hardware_parameter& Hardware_parameter::default_instance() {
  852. ::protobuf_hardware_5flimit_2eproto::InitDefaultsHardware_parameter();
  853. return *internal_default_instance();
  854. }
  855. Hardware_parameter* Hardware_parameter::New(::google::protobuf::Arena* arena) const {
  856. Hardware_parameter* n = new Hardware_parameter;
  857. if (arena != NULL) {
  858. arena->Own(n);
  859. }
  860. return n;
  861. }
  862. void Hardware_parameter::Clear() {
  863. // @@protoc_insertion_point(message_clear_start:Hardware_limit.Hardware_parameter)
  864. ::google::protobuf::uint32 cached_has_bits = 0;
  865. // Prevent compiler warnings about cached_has_bits being unused
  866. (void) cached_has_bits;
  867. railing_parameter_.Clear();
  868. theta_range_.Clear();
  869. cached_has_bits = _has_bits_[0];
  870. if (cached_has_bits & 127u) {
  871. ::memset(&center_min_y_, 0, static_cast<size_t>(
  872. reinterpret_cast<char*>(&height_) -
  873. reinterpret_cast<char*>(&center_min_y_)) + sizeof(height_));
  874. }
  875. _has_bits_.Clear();
  876. _internal_metadata_.Clear();
  877. }
  878. bool Hardware_parameter::MergePartialFromCodedStream(
  879. ::google::protobuf::io::CodedInputStream* input) {
  880. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  881. ::google::protobuf::uint32 tag;
  882. // @@protoc_insertion_point(parse_start:Hardware_limit.Hardware_parameter)
  883. for (;;) {
  884. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  885. tag = p.first;
  886. if (!p.second) goto handle_unusual;
  887. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  888. // repeated .Hardware_limit.Railing railing_parameter = 1;
  889. case 1: {
  890. if (static_cast< ::google::protobuf::uint8>(tag) ==
  891. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  892. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_railing_parameter()));
  893. } else {
  894. goto handle_unusual;
  895. }
  896. break;
  897. }
  898. // required float center_min_y = 2;
  899. case 2: {
  900. if (static_cast< ::google::protobuf::uint8>(tag) ==
  901. static_cast< ::google::protobuf::uint8>(21u /* 21 & 0xFF */)) {
  902. set_has_center_min_y();
  903. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  904. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  905. input, &center_min_y_)));
  906. } else {
  907. goto handle_unusual;
  908. }
  909. break;
  910. }
  911. // required float center_max_y = 3;
  912. case 3: {
  913. if (static_cast< ::google::protobuf::uint8>(tag) ==
  914. static_cast< ::google::protobuf::uint8>(29u /* 29 & 0xFF */)) {
  915. set_has_center_max_y();
  916. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  917. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  918. input, &center_max_y_)));
  919. } else {
  920. goto handle_unusual;
  921. }
  922. break;
  923. }
  924. // required float center_min_x = 4;
  925. case 4: {
  926. if (static_cast< ::google::protobuf::uint8>(tag) ==
  927. static_cast< ::google::protobuf::uint8>(37u /* 37 & 0xFF */)) {
  928. set_has_center_min_x();
  929. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  930. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  931. input, &center_min_x_)));
  932. } else {
  933. goto handle_unusual;
  934. }
  935. break;
  936. }
  937. // required float center_max_x = 5;
  938. case 5: {
  939. if (static_cast< ::google::protobuf::uint8>(tag) ==
  940. static_cast< ::google::protobuf::uint8>(45u /* 45 & 0xFF */)) {
  941. set_has_center_max_x();
  942. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  943. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  944. input, &center_max_x_)));
  945. } else {
  946. goto handle_unusual;
  947. }
  948. break;
  949. }
  950. // required float corner_min_y = 6;
  951. case 6: {
  952. if (static_cast< ::google::protobuf::uint8>(tag) ==
  953. static_cast< ::google::protobuf::uint8>(53u /* 53 & 0xFF */)) {
  954. set_has_corner_min_y();
  955. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  956. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  957. input, &corner_min_y_)));
  958. } else {
  959. goto handle_unusual;
  960. }
  961. break;
  962. }
  963. // required float corner_max_y = 7;
  964. case 7: {
  965. if (static_cast< ::google::protobuf::uint8>(tag) ==
  966. static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
  967. set_has_corner_max_y();
  968. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  969. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  970. input, &corner_max_y_)));
  971. } else {
  972. goto handle_unusual;
  973. }
  974. break;
  975. }
  976. // repeated .Hardware_limit.Theta_range theta_range = 8;
  977. case 8: {
  978. if (static_cast< ::google::protobuf::uint8>(tag) ==
  979. static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
  980. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_theta_range()));
  981. } else {
  982. goto handle_unusual;
  983. }
  984. break;
  985. }
  986. // required float height = 9;
  987. case 9: {
  988. if (static_cast< ::google::protobuf::uint8>(tag) ==
  989. static_cast< ::google::protobuf::uint8>(77u /* 77 & 0xFF */)) {
  990. set_has_height();
  991. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  992. float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
  993. input, &height_)));
  994. } else {
  995. goto handle_unusual;
  996. }
  997. break;
  998. }
  999. default: {
  1000. handle_unusual:
  1001. if (tag == 0) {
  1002. goto success;
  1003. }
  1004. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1005. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1006. break;
  1007. }
  1008. }
  1009. }
  1010. success:
  1011. // @@protoc_insertion_point(parse_success:Hardware_limit.Hardware_parameter)
  1012. return true;
  1013. failure:
  1014. // @@protoc_insertion_point(parse_failure:Hardware_limit.Hardware_parameter)
  1015. return false;
  1016. #undef DO_
  1017. }
  1018. void Hardware_parameter::SerializeWithCachedSizes(
  1019. ::google::protobuf::io::CodedOutputStream* output) const {
  1020. // @@protoc_insertion_point(serialize_start:Hardware_limit.Hardware_parameter)
  1021. ::google::protobuf::uint32 cached_has_bits = 0;
  1022. (void) cached_has_bits;
  1023. // repeated .Hardware_limit.Railing railing_parameter = 1;
  1024. for (unsigned int i = 0,
  1025. n = static_cast<unsigned int>(this->railing_parameter_size()); i < n; i++) {
  1026. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1027. 1, this->railing_parameter(static_cast<int>(i)), output);
  1028. }
  1029. cached_has_bits = _has_bits_[0];
  1030. // required float center_min_y = 2;
  1031. if (cached_has_bits & 0x00000001u) {
  1032. ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->center_min_y(), output);
  1033. }
  1034. // required float center_max_y = 3;
  1035. if (cached_has_bits & 0x00000002u) {
  1036. ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->center_max_y(), output);
  1037. }
  1038. // required float center_min_x = 4;
  1039. if (cached_has_bits & 0x00000004u) {
  1040. ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->center_min_x(), output);
  1041. }
  1042. // required float center_max_x = 5;
  1043. if (cached_has_bits & 0x00000008u) {
  1044. ::google::protobuf::internal::WireFormatLite::WriteFloat(5, this->center_max_x(), output);
  1045. }
  1046. // required float corner_min_y = 6;
  1047. if (cached_has_bits & 0x00000010u) {
  1048. ::google::protobuf::internal::WireFormatLite::WriteFloat(6, this->corner_min_y(), output);
  1049. }
  1050. // required float corner_max_y = 7;
  1051. if (cached_has_bits & 0x00000020u) {
  1052. ::google::protobuf::internal::WireFormatLite::WriteFloat(7, this->corner_max_y(), output);
  1053. }
  1054. // repeated .Hardware_limit.Theta_range theta_range = 8;
  1055. for (unsigned int i = 0,
  1056. n = static_cast<unsigned int>(this->theta_range_size()); i < n; i++) {
  1057. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1058. 8, this->theta_range(static_cast<int>(i)), output);
  1059. }
  1060. // required float height = 9;
  1061. if (cached_has_bits & 0x00000040u) {
  1062. ::google::protobuf::internal::WireFormatLite::WriteFloat(9, this->height(), output);
  1063. }
  1064. if (_internal_metadata_.have_unknown_fields()) {
  1065. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1066. _internal_metadata_.unknown_fields(), output);
  1067. }
  1068. // @@protoc_insertion_point(serialize_end:Hardware_limit.Hardware_parameter)
  1069. }
  1070. ::google::protobuf::uint8* Hardware_parameter::InternalSerializeWithCachedSizesToArray(
  1071. bool deterministic, ::google::protobuf::uint8* target) const {
  1072. (void)deterministic; // Unused
  1073. // @@protoc_insertion_point(serialize_to_array_start:Hardware_limit.Hardware_parameter)
  1074. ::google::protobuf::uint32 cached_has_bits = 0;
  1075. (void) cached_has_bits;
  1076. // repeated .Hardware_limit.Railing railing_parameter = 1;
  1077. for (unsigned int i = 0,
  1078. n = static_cast<unsigned int>(this->railing_parameter_size()); i < n; i++) {
  1079. target = ::google::protobuf::internal::WireFormatLite::
  1080. InternalWriteMessageToArray(
  1081. 1, this->railing_parameter(static_cast<int>(i)), deterministic, target);
  1082. }
  1083. cached_has_bits = _has_bits_[0];
  1084. // required float center_min_y = 2;
  1085. if (cached_has_bits & 0x00000001u) {
  1086. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->center_min_y(), target);
  1087. }
  1088. // required float center_max_y = 3;
  1089. if (cached_has_bits & 0x00000002u) {
  1090. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->center_max_y(), target);
  1091. }
  1092. // required float center_min_x = 4;
  1093. if (cached_has_bits & 0x00000004u) {
  1094. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->center_min_x(), target);
  1095. }
  1096. // required float center_max_x = 5;
  1097. if (cached_has_bits & 0x00000008u) {
  1098. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(5, this->center_max_x(), target);
  1099. }
  1100. // required float corner_min_y = 6;
  1101. if (cached_has_bits & 0x00000010u) {
  1102. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(6, this->corner_min_y(), target);
  1103. }
  1104. // required float corner_max_y = 7;
  1105. if (cached_has_bits & 0x00000020u) {
  1106. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(7, this->corner_max_y(), target);
  1107. }
  1108. // repeated .Hardware_limit.Theta_range theta_range = 8;
  1109. for (unsigned int i = 0,
  1110. n = static_cast<unsigned int>(this->theta_range_size()); i < n; i++) {
  1111. target = ::google::protobuf::internal::WireFormatLite::
  1112. InternalWriteMessageToArray(
  1113. 8, this->theta_range(static_cast<int>(i)), deterministic, target);
  1114. }
  1115. // required float height = 9;
  1116. if (cached_has_bits & 0x00000040u) {
  1117. target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(9, this->height(), target);
  1118. }
  1119. if (_internal_metadata_.have_unknown_fields()) {
  1120. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1121. _internal_metadata_.unknown_fields(), target);
  1122. }
  1123. // @@protoc_insertion_point(serialize_to_array_end:Hardware_limit.Hardware_parameter)
  1124. return target;
  1125. }
  1126. size_t Hardware_parameter::RequiredFieldsByteSizeFallback() const {
  1127. // @@protoc_insertion_point(required_fields_byte_size_fallback_start:Hardware_limit.Hardware_parameter)
  1128. size_t total_size = 0;
  1129. if (has_center_min_y()) {
  1130. // required float center_min_y = 2;
  1131. total_size += 1 + 4;
  1132. }
  1133. if (has_center_max_y()) {
  1134. // required float center_max_y = 3;
  1135. total_size += 1 + 4;
  1136. }
  1137. if (has_center_min_x()) {
  1138. // required float center_min_x = 4;
  1139. total_size += 1 + 4;
  1140. }
  1141. if (has_center_max_x()) {
  1142. // required float center_max_x = 5;
  1143. total_size += 1 + 4;
  1144. }
  1145. if (has_corner_min_y()) {
  1146. // required float corner_min_y = 6;
  1147. total_size += 1 + 4;
  1148. }
  1149. if (has_corner_max_y()) {
  1150. // required float corner_max_y = 7;
  1151. total_size += 1 + 4;
  1152. }
  1153. if (has_height()) {
  1154. // required float height = 9;
  1155. total_size += 1 + 4;
  1156. }
  1157. return total_size;
  1158. }
  1159. size_t Hardware_parameter::ByteSizeLong() const {
  1160. // @@protoc_insertion_point(message_byte_size_start:Hardware_limit.Hardware_parameter)
  1161. size_t total_size = 0;
  1162. if (_internal_metadata_.have_unknown_fields()) {
  1163. total_size +=
  1164. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1165. _internal_metadata_.unknown_fields());
  1166. }
  1167. if (((_has_bits_[0] & 0x0000007f) ^ 0x0000007f) == 0) { // All required fields are present.
  1168. // required float center_min_y = 2;
  1169. total_size += 1 + 4;
  1170. // required float center_max_y = 3;
  1171. total_size += 1 + 4;
  1172. // required float center_min_x = 4;
  1173. total_size += 1 + 4;
  1174. // required float center_max_x = 5;
  1175. total_size += 1 + 4;
  1176. // required float corner_min_y = 6;
  1177. total_size += 1 + 4;
  1178. // required float corner_max_y = 7;
  1179. total_size += 1 + 4;
  1180. // required float height = 9;
  1181. total_size += 1 + 4;
  1182. } else {
  1183. total_size += RequiredFieldsByteSizeFallback();
  1184. }
  1185. // repeated .Hardware_limit.Railing railing_parameter = 1;
  1186. {
  1187. unsigned int count = static_cast<unsigned int>(this->railing_parameter_size());
  1188. total_size += 1UL * count;
  1189. for (unsigned int i = 0; i < count; i++) {
  1190. total_size +=
  1191. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1192. this->railing_parameter(static_cast<int>(i)));
  1193. }
  1194. }
  1195. // repeated .Hardware_limit.Theta_range theta_range = 8;
  1196. {
  1197. unsigned int count = static_cast<unsigned int>(this->theta_range_size());
  1198. total_size += 1UL * count;
  1199. for (unsigned int i = 0; i < count; i++) {
  1200. total_size +=
  1201. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1202. this->theta_range(static_cast<int>(i)));
  1203. }
  1204. }
  1205. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1206. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1207. _cached_size_ = cached_size;
  1208. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1209. return total_size;
  1210. }
  1211. void Hardware_parameter::MergeFrom(const ::google::protobuf::Message& from) {
  1212. // @@protoc_insertion_point(generalized_merge_from_start:Hardware_limit.Hardware_parameter)
  1213. GOOGLE_DCHECK_NE(&from, this);
  1214. const Hardware_parameter* source =
  1215. ::google::protobuf::internal::DynamicCastToGenerated<const Hardware_parameter>(
  1216. &from);
  1217. if (source == NULL) {
  1218. // @@protoc_insertion_point(generalized_merge_from_cast_fail:Hardware_limit.Hardware_parameter)
  1219. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1220. } else {
  1221. // @@protoc_insertion_point(generalized_merge_from_cast_success:Hardware_limit.Hardware_parameter)
  1222. MergeFrom(*source);
  1223. }
  1224. }
  1225. void Hardware_parameter::MergeFrom(const Hardware_parameter& from) {
  1226. // @@protoc_insertion_point(class_specific_merge_from_start:Hardware_limit.Hardware_parameter)
  1227. GOOGLE_DCHECK_NE(&from, this);
  1228. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1229. ::google::protobuf::uint32 cached_has_bits = 0;
  1230. (void) cached_has_bits;
  1231. railing_parameter_.MergeFrom(from.railing_parameter_);
  1232. theta_range_.MergeFrom(from.theta_range_);
  1233. cached_has_bits = from._has_bits_[0];
  1234. if (cached_has_bits & 127u) {
  1235. if (cached_has_bits & 0x00000001u) {
  1236. center_min_y_ = from.center_min_y_;
  1237. }
  1238. if (cached_has_bits & 0x00000002u) {
  1239. center_max_y_ = from.center_max_y_;
  1240. }
  1241. if (cached_has_bits & 0x00000004u) {
  1242. center_min_x_ = from.center_min_x_;
  1243. }
  1244. if (cached_has_bits & 0x00000008u) {
  1245. center_max_x_ = from.center_max_x_;
  1246. }
  1247. if (cached_has_bits & 0x00000010u) {
  1248. corner_min_y_ = from.corner_min_y_;
  1249. }
  1250. if (cached_has_bits & 0x00000020u) {
  1251. corner_max_y_ = from.corner_max_y_;
  1252. }
  1253. if (cached_has_bits & 0x00000040u) {
  1254. height_ = from.height_;
  1255. }
  1256. _has_bits_[0] |= cached_has_bits;
  1257. }
  1258. }
  1259. void Hardware_parameter::CopyFrom(const ::google::protobuf::Message& from) {
  1260. // @@protoc_insertion_point(generalized_copy_from_start:Hardware_limit.Hardware_parameter)
  1261. if (&from == this) return;
  1262. Clear();
  1263. MergeFrom(from);
  1264. }
  1265. void Hardware_parameter::CopyFrom(const Hardware_parameter& from) {
  1266. // @@protoc_insertion_point(class_specific_copy_from_start:Hardware_limit.Hardware_parameter)
  1267. if (&from == this) return;
  1268. Clear();
  1269. MergeFrom(from);
  1270. }
  1271. bool Hardware_parameter::IsInitialized() const {
  1272. if ((_has_bits_[0] & 0x0000007f) != 0x0000007f) return false;
  1273. if (!::google::protobuf::internal::AllAreInitialized(this->railing_parameter())) return false;
  1274. if (!::google::protobuf::internal::AllAreInitialized(this->theta_range())) return false;
  1275. return true;
  1276. }
  1277. void Hardware_parameter::Swap(Hardware_parameter* other) {
  1278. if (other == this) return;
  1279. InternalSwap(other);
  1280. }
  1281. void Hardware_parameter::InternalSwap(Hardware_parameter* other) {
  1282. using std::swap;
  1283. railing_parameter_.InternalSwap(&other->railing_parameter_);
  1284. theta_range_.InternalSwap(&other->theta_range_);
  1285. swap(center_min_y_, other->center_min_y_);
  1286. swap(center_max_y_, other->center_max_y_);
  1287. swap(center_min_x_, other->center_min_x_);
  1288. swap(center_max_x_, other->center_max_x_);
  1289. swap(corner_min_y_, other->corner_min_y_);
  1290. swap(corner_max_y_, other->corner_max_y_);
  1291. swap(height_, other->height_);
  1292. swap(_has_bits_[0], other->_has_bits_[0]);
  1293. _internal_metadata_.Swap(&other->_internal_metadata_);
  1294. swap(_cached_size_, other->_cached_size_);
  1295. }
  1296. ::google::protobuf::Metadata Hardware_parameter::GetMetadata() const {
  1297. protobuf_hardware_5flimit_2eproto::protobuf_AssignDescriptorsOnce();
  1298. return ::protobuf_hardware_5flimit_2eproto::file_level_metadata[kIndexInFileMessages];
  1299. }
  1300. // @@protoc_insertion_point(namespace_scope)
  1301. } // namespace Hardware_limit
  1302. // @@protoc_insertion_point(global_scope)