4 #ifndef PROTOBUF_INCLUDED_gz_2fmsgs_2fpacket_2eproto
5 #define PROTOBUF_INCLUDED_gz_2fmsgs_2fpacket_2eproto
9 #include <google/protobuf/stubs/common.h>
11 #if GOOGLE_PROTOBUF_VERSION < 3006001
12 #error This file was generated by a newer version of protoc which is
13 #error incompatible with your Protocol Buffer headers. Please update
16 #if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
17 #error This file was generated by an older version of protoc which is
18 #error incompatible with your Protocol Buffer headers. Please
19 #error regenerate this file with a newer version of protoc.
22 #include <google/protobuf/io/coded_stream.h>
23 #include <google/protobuf/arena.h>
24 #include <google/protobuf/arenastring.h>
25 #include <google/protobuf/generated_message_table_driven.h>
26 #include <google/protobuf/generated_message_util.h>
27 #include <google/protobuf/inlined_string_field.h>
28 #include <google/protobuf/metadata.h>
29 #include <google/protobuf/message.h>
30 #include <google/protobuf/repeated_field.h>
31 #include <google/protobuf/extension_set.h>
32 #include <google/protobuf/unknown_field_set.h>
33 #include "gz/msgs/double_v.pb.h"
34 #include "gz/msgs/clock.pb.h"
35 #include "gz/msgs/cmd_vel2d.pb.h"
36 #include "gz/msgs/image.pb.h"
37 #include "gz/msgs/pose.pb.h"
38 #include "gz/msgs/pose_v.pb.h"
39 #include "gz/msgs/stringmsg_v.pb.h"
40 #include "gz/msgs/time.pb.h"
41 #include "gz/msgs/web_request.pb.h"
42 #include "gz/msgs/world_stats.pb.h"
44 #define PROTOBUF_INTERNAL_EXPORT_protobuf_gz_2fmsgs_2fpacket_2eproto GZ_MSGS_VISIBLE
49 static const ::google::protobuf::internal::ParseTableField entries[];
50 static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
51 static const ::google::protobuf::internal::ParseTable schema[1];
52 static const ::google::protobuf::internal::FieldMetadata field_metadata[];
53 static const ::google::protobuf::internal::SerializationTable serialization_table[];
54 static const ::google::protobuf::uint32 offsets[];
61 class PacketDefaultTypeInternal;
67 template<> GZ_MSGS_VISIBLE ::gz::msgs::Packet* Arena::CreateMaybeMessage<::gz::msgs::Packet>(Arena*);
75 class GZ_MSGS_VISIBLE
Packet :
public ::google::protobuf::Message {
89 *
this = ::std::move(from);
92 inline Packet& operator=(Packet&& from) noexcept {
93 if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
94 if (
this != &from) InternalSwap(&from);
101 static const ::google::protobuf::Descriptor* descriptor();
102 static const Packet& default_instance();
118 static void InitAsDefaultInstance();
120 return reinterpret_cast<const Packet*
>(
123 static constexpr
int kIndexInFileMessages =
134 return CreateMaybeMessage<Packet>(NULL);
137 Packet*
New(::google::protobuf::Arena* arena)
const final {
138 return CreateMaybeMessage<Packet>(arena);
140 void CopyFrom(const ::google::protobuf::Message& from)
final;
141 void MergeFrom(const ::google::protobuf::Message& from)
final;
142 void CopyFrom(
const Packet& from);
143 void MergeFrom(
const Packet& from);
145 bool IsInitialized() const final;
147 size_t ByteSizeLong() const final;
148 bool MergePartialFromCodedStream(
149 ::
google::protobuf::io::CodedInputStream* input) final;
150 void SerializeWithCachedSizes(
151 ::
google::protobuf::io::CodedOutputStream* output) const final;
152 ::
google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
153 bool deterministic, ::
google::protobuf::uint8* target) const final;
154 int GetCachedSize() const final {
return _cached_size_.Get(); }
159 void SetCachedSize(
int size)
const final;
160 void InternalSwap(
Packet* other);
162 inline ::google::protobuf::Arena* GetArenaNoVirtual()
const {
165 inline void* MaybeArenaPtr()
const {
170 ::google::protobuf::Metadata GetMetadata() const final;
178 static const
int kTopicFieldNumber = 1;
179 const ::
std::
string& topic() const;
180 void set_topic(const ::
std::
string& value);
184 void set_topic(
const char* value);
185 void set_topic(
const char* value,
size_t size);
192 static const int kTypeFieldNumber = 2;
193 const ::std::string& type()
const;
194 void set_type(const ::std::string& value);
198 void set_type(
const char* value);
199 void set_type(
const char* value,
size_t size);
205 bool has_cmd_vel2d()
const;
206 void clear_cmd_vel2d();
207 static const int kCmdVel2DFieldNumber = 3;
209 const ::gz::msgs::CmdVel2D& _internal_cmd_vel2d()
const;
211 const ::gz::msgs::CmdVel2D& cmd_vel2d()
const;
217 bool has_image()
const;
219 static const int kImageFieldNumber = 4;
221 const ::gz::msgs::Image& _internal_image()
const;
223 const ::gz::msgs::Image& image()
const;
229 bool has_string_msg_v()
const;
230 void clear_string_msg_v();
231 static const int kStringMsgVFieldNumber = 5;
233 const ::gz::msgs::StringMsg_V& _internal_string_msg_v()
const;
235 const ::gz::msgs::StringMsg_V& string_msg_v()
const;
241 bool has_web_request()
const;
242 void clear_web_request();
243 static const int kWebRequestFieldNumber = 6;
245 const ::gz::msgs::WebRequest& _internal_web_request()
const;
247 const ::gz::msgs::WebRequest& web_request()
const;
253 bool has_pose()
const;
255 static const int kPoseFieldNumber = 7;
257 const ::gz::msgs::Pose& _internal_pose()
const;
259 const ::gz::msgs::Pose& pose()
const;
265 bool has_doublev()
const;
266 void clear_doublev();
267 static const int kDoublevFieldNumber = 8;
269 const ::gz::msgs::Double_V& _internal_doublev()
const;
271 const ::gz::msgs::Double_V& doublev()
const;
277 bool has_pose_v()
const;
279 static const int kPoseVFieldNumber = 9;
281 const ::gz::msgs::Pose_V& _internal_pose_v()
const;
283 const ::gz::msgs::Pose_V& pose_v()
const;
289 bool has_time()
const;
291 static const int kTimeFieldNumber = 10;
293 const ::gz::msgs::Time& _internal_time()
const;
295 const ::gz::msgs::Time& time()
const;
301 bool has_clock()
const;
303 static const int kClockFieldNumber = 11;
305 const ::gz::msgs::Clock& _internal_clock()
const;
307 const ::gz::msgs::Clock&
clock()
const;
313 bool has_world_stats()
const;
314 void clear_world_stats();
315 static const int kWorldStatsFieldNumber = 12;
317 const ::gz::msgs::WorldStatistics& _internal_world_stats()
const;
319 const ::gz::msgs::WorldStatistics& world_stats()
const;
324 void clear_content();
328 void set_has_cmd_vel2d();
329 void set_has_image();
330 void set_has_string_msg_v();
331 void set_has_web_request();
333 void set_has_doublev();
334 void set_has_pose_v();
336 void set_has_clock();
337 void set_has_world_stats();
339 inline bool has_content()
const;
340 inline void clear_has_content();
342 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
343 ::google::protobuf::internal::ArenaStringPtr topic_;
344 ::google::protobuf::internal::ArenaStringPtr type_;
358 mutable ::google::protobuf::internal::CachedSize _cached_size_;
359 ::google::protobuf::uint32 _oneof_case_[1];
361 friend struct ::protobuf_gz_2fmsgs_2fpacket_2eproto::TableStruct;
369 #pragma GCC diagnostic push
370 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
376 topic_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
380 return topic_.GetNoArena();
384 topic_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
391 &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::
std::move(value));
396 GOOGLE_DCHECK(value != NULL);
398 topic_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::
std::string(value));
403 topic_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
404 ::
std::string(
reinterpret_cast<const char*
>(value), size));
410 return topic_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
415 return topic_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
423 topic_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
topic);
429 type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
433 return type_.GetNoArena();
437 type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
444 &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::
std::move(value));
449 GOOGLE_DCHECK(value != NULL);
451 type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::
std::string(value));
456 type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
457 ::
std::string(
reinterpret_cast<const char*
>(value), size));
463 return type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
468 return type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
476 type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
type);
484 inline void Packet::set_has_cmd_vel2d() {
487 inline const ::gz::msgs::CmdVel2D& Packet::_internal_cmd_vel2d()
const {
488 return *content_.cmd_vel2d_;
495 content_.cmd_vel2d_ = NULL;
504 ? *content_.cmd_vel2d_
511 content_.cmd_vel2d_ = CreateMaybeMessage< ::gz::msgs::CmdVel2D >(
512 GetArenaNoVirtual());
515 return content_.cmd_vel2d_;
522 inline void Packet::set_has_image() {
525 inline const ::gz::msgs::Image& Packet::_internal_image()
const {
526 return *content_.image_;
533 content_.image_ = NULL;
549 content_.image_ = CreateMaybeMessage< ::gz::msgs::Image >(
550 GetArenaNoVirtual());
553 return content_.image_;
560 inline void Packet::set_has_string_msg_v() {
563 inline const ::gz::msgs::StringMsg_V& Packet::_internal_string_msg_v()
const {
564 return *content_.string_msg_v_;
571 content_.string_msg_v_ = NULL;
580 ? *content_.string_msg_v_
586 set_has_string_msg_v();
587 content_.string_msg_v_ = CreateMaybeMessage< ::gz::msgs::StringMsg_V >(
588 GetArenaNoVirtual());
591 return content_.string_msg_v_;
598 inline void Packet::set_has_web_request() {
601 inline const ::gz::msgs::WebRequest& Packet::_internal_web_request()
const {
602 return *content_.web_request_;
609 content_.web_request_ = NULL;
618 ? *content_.web_request_
624 set_has_web_request();
625 content_.web_request_ = CreateMaybeMessage< ::gz::msgs::WebRequest >(
626 GetArenaNoVirtual());
629 return content_.web_request_;
636 inline void Packet::set_has_pose() {
637 _oneof_case_[0] =
kPose;
639 inline const ::gz::msgs::Pose& Packet::_internal_pose()
const {
640 return *content_.pose_;
647 content_.pose_ = NULL;
663 content_.pose_ = CreateMaybeMessage< ::gz::msgs::Pose >(
664 GetArenaNoVirtual());
667 return content_.pose_;
674 inline void Packet::set_has_doublev() {
677 inline const ::gz::msgs::Double_V& Packet::_internal_doublev()
const {
678 return *content_.doublev_;
685 content_.doublev_ = NULL;
701 content_.doublev_ = CreateMaybeMessage< ::gz::msgs::Double_V >(
702 GetArenaNoVirtual());
705 return content_.doublev_;
712 inline void Packet::set_has_pose_v() {
715 inline const ::gz::msgs::Pose_V& Packet::_internal_pose_v()
const {
716 return *content_.pose_v_;
723 content_.pose_v_ = NULL;
739 content_.pose_v_ = CreateMaybeMessage< ::gz::msgs::Pose_V >(
740 GetArenaNoVirtual());
743 return content_.pose_v_;
750 inline void Packet::set_has_time() {
751 _oneof_case_[0] =
kTime;
753 inline const ::gz::msgs::Time& Packet::_internal_time()
const {
754 return *content_.time_;
761 content_.time_ = NULL;
777 content_.time_ = CreateMaybeMessage< ::gz::msgs::Time >(
778 GetArenaNoVirtual());
781 return content_.time_;
788 inline void Packet::set_has_clock() {
791 inline const ::gz::msgs::Clock& Packet::_internal_clock()
const {
792 return *content_.clock_;
799 content_.clock_ = NULL;
815 content_.clock_ = CreateMaybeMessage< ::gz::msgs::Clock >(
816 GetArenaNoVirtual());
819 return content_.clock_;
826 inline void Packet::set_has_world_stats() {
829 inline const ::gz::msgs::WorldStatistics& Packet::_internal_world_stats()
const {
830 return *content_.world_stats_;
837 content_.world_stats_ = NULL;
846 ? *content_.world_stats_
852 set_has_world_stats();
853 content_.world_stats_ = CreateMaybeMessage< ::gz::msgs::WorldStatistics >(
854 GetArenaNoVirtual());
857 return content_.world_stats_;
860 inline bool Packet::has_content()
const {
863 inline void Packet::clear_has_content() {
870 #pragma GCC diagnostic pop
880 #endif // PROTOBUF_INCLUDED_gz_2fmsgs_2fpacket_2eproto