4 #ifndef PROTOBUF_INCLUDED_gz_2fmsgs_2fany_2eproto
5 #define PROTOBUF_INCLUDED_gz_2fmsgs_2fany_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/generated_enum_reflection.h>
33 #include <google/protobuf/unknown_field_set.h>
34 #include "gz/msgs/header.pb.h"
35 #include "gz/msgs/color.pb.h"
36 #include "gz/msgs/pose.pb.h"
37 #include "gz/msgs/quaternion.pb.h"
38 #include "gz/msgs/time.pb.h"
39 #include "gz/msgs/vector3d.pb.h"
41 #define PROTOBUF_INTERNAL_EXPORT_protobuf_gz_2fmsgs_2fany_2eproto GZ_MSGS_VISIBLE
46 static const ::google::protobuf::internal::ParseTableField entries[];
47 static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
48 static const ::google::protobuf::internal::ParseTable schema[1];
49 static const ::google::protobuf::internal::FieldMetadata field_metadata[];
50 static const ::google::protobuf::internal::SerializationTable serialization_table[];
51 static const ::google::protobuf::uint32 offsets[];
58 class AnyDefaultTypeInternal;
64 template<> GZ_MSGS_VISIBLE ::gz::msgs::Any* Arena::CreateMaybeMessage<::gz::msgs::Any>(Arena*);
91 return ::google::protobuf::internal::NameOfEnum(
96 return ::google::protobuf::internal::ParseNamedEnum<Any_ValueType>(
101 class GZ_MSGS_VISIBLE
Any :
public ::google::protobuf::Message {
115 *
this = ::std::move(from);
118 inline Any& operator=(Any&& from) noexcept {
119 if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
120 if (
this != &from) InternalSwap(&from);
127 static const ::google::protobuf::Descriptor* descriptor();
128 static const Any& default_instance();
138 kQuaternionValue = 10,
143 static void InitAsDefaultInstance();
145 return reinterpret_cast<const Any*
>(
148 static constexpr
int kIndexInFileMessages =
151 void Swap(
Any* other);
159 return CreateMaybeMessage<Any>(NULL);
162 Any*
New(::google::protobuf::Arena* arena)
const final {
163 return CreateMaybeMessage<Any>(arena);
165 void CopyFrom(const ::google::protobuf::Message& from)
final;
166 void MergeFrom(const ::google::protobuf::Message& from)
final;
167 void CopyFrom(
const Any& from);
168 void MergeFrom(
const Any& from);
170 bool IsInitialized() const final;
172 size_t ByteSizeLong() const final;
173 bool MergePartialFromCodedStream(
174 ::
google::protobuf::io::CodedInputStream* input) final;
175 void SerializeWithCachedSizes(
176 ::
google::protobuf::io::CodedOutputStream* output) const final;
177 ::
google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
178 bool deterministic, ::
google::protobuf::uint8* target) const final;
179 int GetCachedSize() const final {
return _cached_size_.Get(); }
184 void SetCachedSize(
int size)
const final;
185 void InternalSwap(
Any* other);
187 inline ::google::protobuf::Arena* GetArenaNoVirtual()
const {
190 inline void* MaybeArenaPtr()
const {
195 ::google::protobuf::Metadata GetMetadata() const final;
220 static inline
bool ValueType_IsValid(
int value) {
227 static const int ValueType_ARRAYSIZE =
229 static inline const ::google::protobuf::EnumDescriptor*
244 bool has_header()
const;
246 static const int kHeaderFieldNumber = 1;
248 const ::gz::msgs::Header& _internal_header()
const;
250 const ::gz::msgs::Header& header()
const;
257 static const int kTypeFieldNumber = 2;
263 bool has_double_value()
const;
265 void clear_double_value();
266 static const int kDoubleValueFieldNumber = 3;
267 double double_value()
const;
268 void set_double_value(
double value);
272 bool has_int_value()
const;
274 void clear_int_value();
275 static const int kIntValueFieldNumber = 4;
276 ::google::protobuf::int32 int_value()
const;
277 void set_int_value(::google::protobuf::int32 value);
281 bool has_string_value()
const;
283 void clear_string_value();
284 static const int kStringValueFieldNumber = 5;
285 const ::std::string& string_value()
const;
286 void set_string_value(const ::std::string& value);
290 void set_string_value(
const char* value);
291 void set_string_value(
const char* value,
size_t size);
294 void set_allocated_string_value(::
std::string* string_value);
298 bool has_bool_value()
const;
300 void clear_bool_value();
301 static const int kBoolValueFieldNumber = 6;
302 bool bool_value()
const;
303 void set_bool_value(
bool value);
306 bool has_vector3d_value()
const;
307 void clear_vector3d_value();
308 static const int kVector3DValueFieldNumber = 7;
310 const ::gz::msgs::Vector3d& _internal_vector3d_value()
const;
312 const ::gz::msgs::Vector3d& vector3d_value()
const;
318 bool has_color_value()
const;
319 void clear_color_value();
320 static const int kColorValueFieldNumber = 8;
322 const ::gz::msgs::Color& _internal_color_value()
const;
324 const ::gz::msgs::Color& color_value()
const;
330 bool has_pose3d_value()
const;
331 void clear_pose3d_value();
332 static const int kPose3DValueFieldNumber = 9;
334 const ::gz::msgs::Pose& _internal_pose3d_value()
const;
336 const ::gz::msgs::Pose& pose3d_value()
const;
342 bool has_quaternion_value()
const;
343 void clear_quaternion_value();
344 static const int kQuaternionValueFieldNumber = 10;
346 const ::gz::msgs::Quaternion& _internal_quaternion_value()
const;
348 const ::gz::msgs::Quaternion& quaternion_value()
const;
354 bool has_time_value()
const;
355 void clear_time_value();
356 static const int kTimeValueFieldNumber = 11;
358 const ::gz::msgs::Time& _internal_time_value()
const;
360 const ::gz::msgs::Time& time_value()
const;
369 void set_has_double_value();
370 void set_has_int_value();
371 void set_has_string_value();
372 void set_has_bool_value();
373 void set_has_vector3d_value();
374 void set_has_color_value();
375 void set_has_pose3d_value();
376 void set_has_quaternion_value();
377 void set_has_time_value();
379 inline bool has_value()
const;
380 inline void clear_has_value();
382 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
387 double double_value_;
388 ::google::protobuf::int32 int_value_;
389 ::google::protobuf::internal::ArenaStringPtr string_value_;
397 mutable ::google::protobuf::internal::CachedSize _cached_size_;
398 ::google::protobuf::uint32 _oneof_case_[1];
400 friend struct ::protobuf_gz_2fmsgs_2fany_2eproto::TableStruct;
408 #pragma GCC diagnostic push
409 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
417 inline const ::gz::msgs::Header& Any::_internal_header()
const {
421 const ::gz::msgs::Header* p = header_;
435 if (header_ == NULL) {
436 auto* p = CreateMaybeMessage<::gz::msgs::Header>(GetArenaNoVirtual());
443 ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
444 if (message_arena == NULL) {
445 delete reinterpret_cast< ::google::protobuf::MessageLite*
>(header_);
448 ::google::protobuf::Arena* submessage_arena = NULL;
449 if (message_arena != submessage_arena) {
450 header = ::google::protobuf::internal::GetOwnedMessage(
451 message_arena,
header, submessage_arena);
476 inline bool Any::has_double_value()
const {
479 inline void Any::set_has_double_value() {
483 if (has_double_value()) {
484 value_.double_value_ = 0;
490 if (has_double_value()) {
491 return value_.double_value_;
496 if (!has_double_value()) {
498 set_has_double_value();
500 value_.double_value_ = value;
505 inline bool Any::has_int_value()
const {
508 inline void Any::set_has_int_value() {
512 if (has_int_value()) {
513 value_.int_value_ = 0;
519 if (has_int_value()) {
520 return value_.int_value_;
525 if (!has_int_value()) {
529 value_.int_value_ = value;
534 inline bool Any::has_string_value()
const {
537 inline void Any::set_has_string_value() {
541 if (has_string_value()) {
542 value_.string_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
548 if (has_string_value()) {
549 return value_.string_value_.GetNoArena();
551 return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
555 if (!has_string_value()) {
557 set_has_string_value();
558 value_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
560 value_.string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
566 if (!has_string_value()) {
568 set_has_string_value();
569 value_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
571 value_.string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::
std::move(value));
576 GOOGLE_DCHECK(value != NULL);
577 if (!has_string_value()) {
579 set_has_string_value();
580 value_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
582 value_.string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
587 if (!has_string_value()) {
589 set_has_string_value();
590 value_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
592 value_.string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::
std::string(
593 reinterpret_cast<const char*
>(value), size));
597 if (!has_string_value()) {
599 set_has_string_value();
600 value_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
603 return value_.string_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
607 if (has_string_value()) {
609 return value_.string_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
615 if (!has_string_value()) {
616 value_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
620 set_has_string_value();
621 value_.string_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
string_value);
627 inline bool Any::has_bool_value()
const {
630 inline void Any::set_has_bool_value() {
634 if (has_bool_value()) {
635 value_.bool_value_ =
false;
641 if (has_bool_value()) {
642 return value_.bool_value_;
647 if (!has_bool_value()) {
649 set_has_bool_value();
651 value_.bool_value_ = value;
659 inline void Any::set_has_vector3d_value() {
662 inline const ::gz::msgs::Vector3d& Any::_internal_vector3d_value()
const {
663 return *value_.vector3d_value_;
670 value_.vector3d_value_ = NULL;
679 ? *value_.vector3d_value_
685 set_has_vector3d_value();
686 value_.vector3d_value_ = CreateMaybeMessage< ::gz::msgs::Vector3d >(
687 GetArenaNoVirtual());
690 return value_.vector3d_value_;
697 inline void Any::set_has_color_value() {
700 inline const ::gz::msgs::Color& Any::_internal_color_value()
const {
701 return *value_.color_value_;
708 value_.color_value_ = NULL;
717 ? *value_.color_value_
723 set_has_color_value();
724 value_.color_value_ = CreateMaybeMessage< ::gz::msgs::Color >(
725 GetArenaNoVirtual());
728 return value_.color_value_;
735 inline void Any::set_has_pose3d_value() {
738 inline const ::gz::msgs::Pose& Any::_internal_pose3d_value()
const {
739 return *value_.pose3d_value_;
746 value_.pose3d_value_ = NULL;
755 ? *value_.pose3d_value_
761 set_has_pose3d_value();
762 value_.pose3d_value_ = CreateMaybeMessage< ::gz::msgs::Pose >(
763 GetArenaNoVirtual());
766 return value_.pose3d_value_;
773 inline void Any::set_has_quaternion_value() {
776 inline const ::gz::msgs::Quaternion& Any::_internal_quaternion_value()
const {
777 return *value_.quaternion_value_;
784 value_.quaternion_value_ = NULL;
793 ? *value_.quaternion_value_
799 set_has_quaternion_value();
800 value_.quaternion_value_ = CreateMaybeMessage< ::gz::msgs::Quaternion >(
801 GetArenaNoVirtual());
804 return value_.quaternion_value_;
811 inline void Any::set_has_time_value() {
814 inline const ::gz::msgs::Time& Any::_internal_time_value()
const {
815 return *value_.time_value_;
822 value_.time_value_ = NULL;
831 ? *value_.time_value_
837 set_has_time_value();
838 value_.time_value_ = CreateMaybeMessage< ::gz::msgs::Time >(
839 GetArenaNoVirtual());
842 return value_.time_value_;
845 inline bool Any::has_value()
const {
848 inline void Any::clear_has_value() {
855 #pragma GCC diagnostic pop
868 inline const EnumDescriptor* GetEnumDescriptor< ::gz::msgs::Any_ValueType>() {
877 #endif // PROTOBUF_INCLUDED_gz_2fmsgs_2fany_2eproto