110#ifndef GOOGLE_PROTOBUF_MESSAGE_H__
111#define GOOGLE_PROTOBUF_MESSAGE_H__
116#include <type_traits>
119#include <google/protobuf/stubs/casts.h>
120#include <google/protobuf/stubs/common.h>
122#include <google/protobuf/port.h>
123#include <google/protobuf/descriptor.h>
124#include <google/protobuf/generated_message_reflection.h>
125#include <google/protobuf/generated_message_util.h>
126#include <google/protobuf/map.h>
131#include <google/protobuf/port_def.inc>
134#error "You cannot SWIG proto headers"
146class AssignDescriptorsHelper;
147class DynamicMessageFactory;
148class GeneratedMessageReflectionTestHelper;
150class MapValueConstRef;
153class MapReflectionTester;
156struct DescriptorTable;
158class SwapFieldHelper;
161class UnknownFieldSet;
163class ZeroCopyInputStream;
164class ZeroCopyOutputStream;
165class CodedInputStream;
166class CodedOutputStream;
169class MapReflectionFriend;
170class MessageReflectionFriend;
173class CelMapReflectionFriend;
177class MapFieldPrinterHelper;
180class MessageDifferencer;
185class ReflectionAccessor;
189class MapFieldReflectionTest;
207 return reinterpret_cast<To*
>(
reinterpret_cast<char*
>(message) + offset);
212 return reinterpret_cast<const To*
>(
reinterpret_cast<const char*
>(message) +
218 return *GetConstPointerAtOffset<To>(&message, offset);
303 PROTOBUF_DEPRECATED_MSG(
"Please use SpaceUsedLong() instead")
304 int SpaceUsed()
const {
return internal::ToIntSize(SpaceUsedLong()); }
335 internal::ParseContext* ctx)
override;
338 io::EpsCopyOutputStream* stream)
const override;
348 virtual void SetCachedSize(
int size)
const;
357 const Descriptor*
GetDescriptor()
const {
return GetMetadata().descriptor; }
393 inline explicit Message(Arena* arena,
bool is_message_owned =
false)
396 internal::CachedSize* cached_size)
const;
398 internal::CachedSize* cached_size)
const;
405 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(
Message);
411class RepeatedFieldAccessor;
416template <
typename T,
typename Enable =
void>
419template <
typename T,
typename Enable =
void>
474 PROTOBUF_DEPRECATED_MSG(
"Please use SpaceUsedLong() instead")
476 return internal::ToIntSize(SpaceUsedLong(message));
492 const OneofDescriptor* oneof_descriptor)
const;
495 const OneofDescriptor* oneof_descriptor)
const;
499 const Message& message,
const OneofDescriptor* oneof_descriptor)
const;
512 const FieldDescriptor* field)
const;
518 const FieldDescriptor* field)
const;
525 const std::vector<const FieldDescriptor*>& fields)
const;
539 const std::vector<const FieldDescriptor*>& fields)
const;
550 std::vector<const FieldDescriptor*>* output)
const;
559 const FieldDescriptor* field)
const;
561 const FieldDescriptor* field)
const;
566 const FieldDescriptor* field)
const;
568 const FieldDescriptor* field)
const;
579 const FieldDescriptor* field,
598 const FieldDescriptor* field,
599 std::string* scratch)
const;
606 int32_t value)
const;
608 int64_t value)
const;
610 uint32_t value)
const;
612 uint64_t value)
const;
620 std::string value)
const;
622 const EnumValueDescriptor* value)
const;
651 const FieldDescriptor* field)
const;
657 const FieldDescriptor* field)
const;
667 Message* message,
const FieldDescriptor* field,
674 const FieldDescriptor* field,
686 const FieldDescriptor* field,
int index)
const;
688 const FieldDescriptor* field,
int index)
const;
696 const FieldDescriptor* field,
int index)
const;
698 const FieldDescriptor* field,
708 const FieldDescriptor* field,
713 const FieldDescriptor* field,
715 std::string* scratch)
const;
722 int index, int32_t value)
const;
724 int index, int64_t value)
const;
726 int index, uint32_t value)
const;
728 int index, uint64_t value)
const;
730 int index,
float value)
const;
732 int index,
double value)
const;
734 int index,
bool value)
const;
736 int index, std::string value)
const;
738 int index,
const EnumValueDescriptor* value)
const;
747 int index,
int value)
const;
751 const FieldDescriptor* field,
759 int32_t value)
const;
761 int64_t value)
const;
763 uint32_t value)
const;
765 uint64_t value)
const;
773 std::string value)
const;
775 const EnumValueDescriptor* value)
const;
798 const FieldDescriptor* field,
825 template <
typename T>
827 const FieldDescriptor* field)
const;
831 template <
typename T>
833 Message* message,
const FieldDescriptor* field)
const;
852 template <
typename T>
853 PROTOBUF_DEPRECATED_MSG(
"Please use GetRepeatedFieldRef() instead")
855 const FieldDescriptor* d)
const {
856 return GetRepeatedFieldInternal<T>(msg, d);
862 template <
typename T>
863 PROTOBUF_DEPRECATED_MSG(
"Please use GetMutableRepeatedFieldRef() instead")
865 const FieldDescriptor* d)
const {
866 return MutableRepeatedFieldInternal<T>(msg, d);
873 template <
typename T>
874 PROTOBUF_DEPRECATED_MSG(
"Please use GetRepeatedFieldRef() instead")
876 const
Message& msg, const FieldDescriptor* d)
const {
877 return GetRepeatedPtrFieldInternal<T>(msg, d);
884 template <
typename T>
885 PROTOBUF_DEPRECATED_MSG(
"Please use GetMutableRepeatedFieldRef() instead")
887 const FieldDescriptor* d)
const {
888 return MutableRepeatedPtrFieldInternal<T>(msg, d);
896 const std::string& name)
const;
946 template <
typename T>
948 const Message& message,
const FieldDescriptor* field)
const;
949 template <
typename T>
951 Message* message,
const FieldDescriptor* field)
const;
952 template <
typename T>
954 const Message& message,
const FieldDescriptor* field)
const;
955 template <
typename T>
957 Message* message,
const FieldDescriptor* field)
const;
963 void* MutableRawRepeatedField(
Message* message,
const FieldDescriptor* field,
964 FieldDescriptor::CppType,
int ctype,
965 const Descriptor* message_type)
const;
967 const void* GetRawRepeatedField(
const Message& message,
968 const FieldDescriptor* field,
969 FieldDescriptor::CppType cpptype,
int ctype,
970 const Descriptor* message_type)
const;
986 void* RepeatedFieldData(
Message* message,
const FieldDescriptor* field,
987 FieldDescriptor::CppType cpp_type,
988 const Descriptor* message_type)
const;
992 const internal::RepeatedFieldAccessor* RepeatedFieldAccessor(
993 const FieldDescriptor* field)
const;
997 void ListFieldsOmitStripped(
999 std::vector<const FieldDescriptor*>* output)
const;
1001 bool IsMessageStripped(
const Descriptor* descriptor)
const {
1002 return schema_.IsMessageStripped(descriptor);
1005 friend class TextFormat;
1007 void ListFieldsMayFailOnStripped(
1008 const Message& message,
bool should_fail,
1009 std::vector<const FieldDescriptor*>* output)
const;
1019 bool IsLazyField(
const FieldDescriptor* field)
const {
1020 return IsLazilyVerifiedLazyField(field) ||
1021 IsEagerlyVerifiedLazyField(field);
1026 bool IsLazyExtension(
const Message& message,
1027 const FieldDescriptor* field)
const;
1029 bool IsLazilyVerifiedLazyField(
const FieldDescriptor* field)
const;
1030 bool IsEagerlyVerifiedLazyField(
const FieldDescriptor* field)
const;
1032 friend class FastReflectionMessageMutator;
1035 const Descriptor*
const descriptor_;
1036 const internal::ReflectionSchema schema_;
1037 const DescriptorPool*
const descriptor_pool_;
1043 int last_non_weak_field_index_;
1045 template <
typename T,
typename Enable>
1047 template <
typename T,
typename Enable>
1049 friend class ::PROTOBUF_NAMESPACE_ID::MessageLayoutInspector;
1050 friend class ::PROTOBUF_NAMESPACE_ID::AssignDescriptorsHelper;
1051 friend class DynamicMessageFactory;
1052 friend class GeneratedMessageReflectionTestHelper;
1053 friend class python::MapReflectionFriend;
1054 friend class python::MessageReflectionFriend;
1055 friend class util::MessageDifferencer;
1056#define GOOGLE_PROTOBUF_HAS_CEL_MAP_REFLECTION_FRIEND
1057 friend class expr::CelMapReflectionFriend;
1058 friend class internal::MapFieldReflectionTest;
1059 friend class internal::MapKeySorter;
1060 friend class internal::WireFormat;
1061 friend class internal::ReflectionOps;
1062 friend class internal::SwapFieldHelper;
1064 friend class internal::MapFieldPrinterHelper;
1067 const internal::ReflectionSchema& schema,
1076 void* MutableRawRepeatedString(
Message* message,
const FieldDescriptor* field,
1077 bool is_string)
const;
1079 friend class MapReflectionTester;
1081 bool ContainsMapKey(
const Message& message,
const FieldDescriptor* field,
1082 const MapKey& key)
const;
1088 bool InsertOrLookupMapValue(
Message* message,
const FieldDescriptor* field,
1089 const MapKey& key, MapValueRef* val)
const;
1094 bool LookupMapValue(
const Message& message,
const FieldDescriptor* field,
1095 const MapKey& key, MapValueConstRef* val)
const;
1096 bool LookupMapValue(
const Message&,
const FieldDescriptor*,
const MapKey&,
1097 MapValueRef*)
const =
delete;
1101 bool DeleteMapValue(
Message* message,
const FieldDescriptor* field,
1102 const MapKey& key)
const;
1107 MapIterator MapBegin(
Message* message,
const FieldDescriptor* field)
const;
1112 MapIterator MapEnd(
Message* message,
const FieldDescriptor* field)
const;
1116 int MapSize(
const Message& message,
const FieldDescriptor* field)
const;
1119 friend class MapIterator;
1120 friend class WireFormatForMapFieldTest;
1121 internal::MapFieldBase* MutableMapData(
Message* message,
1122 const FieldDescriptor* field)
const;
1124 const internal::MapFieldBase* GetMapData(
const Message& message,
1125 const FieldDescriptor* field)
const;
1128 const T& GetRawNonOneof(
const Message& message,
1129 const FieldDescriptor* field)
const;
1131 T* MutableRawNonOneof(
Message* message,
const FieldDescriptor* field)
const;
1133 template <
typename Type>
1134 const Type& GetRaw(
const Message& message,
1135 const FieldDescriptor* field)
const;
1136 template <
typename Type>
1137 inline Type* MutableRaw(
Message* message,
const FieldDescriptor* field)
const;
1138 template <
typename Type>
1139 const Type& DefaultRaw(
const FieldDescriptor* field)
const;
1141 const Message* GetDefaultMessageInstance(
const FieldDescriptor* field)
const;
1143 inline const uint32_t* GetHasBits(
const Message& message)
const;
1144 inline uint32_t* MutableHasBits(
Message* message)
const;
1145 inline uint32_t GetOneofCase(
const Message& message,
1146 const OneofDescriptor* oneof_descriptor)
const;
1147 inline uint32_t* MutableOneofCase(
1148 Message* message,
const OneofDescriptor* oneof_descriptor)
const;
1149 inline bool HasExtensionSet(
const Message& )
const {
1150 return schema_.HasExtensionSet();
1152 const internal::ExtensionSet& GetExtensionSet(
const Message& message)
const;
1153 internal::ExtensionSet* MutableExtensionSet(
Message* message)
const;
1155 const internal::InternalMetadata& GetInternalMetadata(
1156 const Message& message)
const;
1158 internal::InternalMetadata* MutableInternalMetadata(
Message* message)
const;
1160 inline bool IsInlined(
const FieldDescriptor* field)
const;
1162 inline bool HasBit(
const Message& message,
1163 const FieldDescriptor* field)
const;
1164 inline void SetBit(
Message* message,
const FieldDescriptor* field)
const;
1165 inline void ClearBit(
Message* message,
const FieldDescriptor* field)
const;
1167 const FieldDescriptor* field)
const;
1169 inline const uint32_t* GetInlinedStringDonatedArray(
1170 const Message& message)
const;
1171 inline uint32_t* MutableInlinedStringDonatedArray(
Message* message)
const;
1172 inline bool IsInlinedStringDonated(
const Message& message,
1173 const FieldDescriptor* field)
const;
1175 const FieldDescriptor* field)
const;
1179 void UnsafeShallowSwapFields(
1181 const std::vector<const FieldDescriptor*>& fields)
const;
1186 const FieldDescriptor* field)
const;
1189 void UnsafeShallowSwapField(
Message* message1,
Message* message2,
1190 const FieldDescriptor* field)
const;
1192 template <
bool unsafe_shallow_swap>
1194 const std::vector<const FieldDescriptor*>& fields)
const;
1196 template <
bool unsafe_shallow_swap>
1198 const OneofDescriptor* oneof_descriptor)
const;
1200 inline bool HasOneofField(
const Message& message,
1201 const FieldDescriptor* field)
const;
1202 inline void SetOneofCase(
Message* message,
1203 const FieldDescriptor* field)
const;
1204 inline void ClearOneofField(
Message* message,
1205 const FieldDescriptor* field)
const;
1207 template <
typename Type>
1208 inline const Type& GetField(
const Message& message,
1209 const FieldDescriptor* field)
const;
1210 template <
typename Type>
1211 inline void SetField(
Message* message,
const FieldDescriptor* field,
1212 const Type& value)
const;
1213 template <
typename Type>
1214 inline Type* MutableField(
Message* message,
1215 const FieldDescriptor* field)
const;
1216 template <
typename Type>
1217 inline const Type& GetRepeatedField(
const Message& message,
1218 const FieldDescriptor* field,
1220 template <
typename Type>
1221 inline const Type& GetRepeatedPtrField(
const Message& message,
1222 const FieldDescriptor* field,
1224 template <
typename Type>
1225 inline void SetRepeatedField(
Message* message,
const FieldDescriptor* field,
1226 int index, Type value)
const;
1227 template <
typename Type>
1228 inline Type* MutableRepeatedField(
Message* message,
1229 const FieldDescriptor* field,
1231 template <
typename Type>
1232 inline void AddField(
Message* message,
const FieldDescriptor* field,
1233 const Type& value)
const;
1234 template <
typename Type>
1235 inline Type* AddField(
Message* message,
const FieldDescriptor* field)
const;
1237 int GetExtensionNumberOrDie(
const Descriptor* type)
const;
1241 void SetEnumValueInternal(
Message* message,
const FieldDescriptor* field,
1243 void SetRepeatedEnumValueInternal(
Message* message,
1244 const FieldDescriptor* field,
int index,
1246 void AddEnumValueInternal(
Message* message,
const FieldDescriptor* field,
1253 const FieldDescriptor* field,
1257 internal::ParseContext* ctx);
1262 internal::ParseContext* ctx);
1264 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(
Reflection);
1318 const google::protobuf::internal::DescriptorTable* table);
1331#define DECLARE_GET_REPEATED_FIELD(TYPE) \
1333 PROTOBUF_EXPORT const RepeatedField<TYPE>& \
1334 Reflection::GetRepeatedFieldInternal<TYPE>( \
1335 const Message& message, const FieldDescriptor* field) const; \
1338 PROTOBUF_EXPORT RepeatedField<TYPE>* \
1339 Reflection::MutableRepeatedFieldInternal<TYPE>( \
1340 Message * message, const FieldDescriptor* field) const;
1350#undef DECLARE_GET_REPEATED_FIELD
1359template <
typename T>
1363 const T& (*get_default_instance)() = &T::default_instance;
1364 (void)get_default_instance;
1367 const Message* unused =
static_cast<T*
>(
nullptr);
1371 return dynamic_cast<const T*
>(from);
1373 bool ok = from !=
nullptr &&
1375 return ok ? down_cast<const T*>(from) :
nullptr;
1379template <
typename T>
1381 const Message* message_const = from;
1382 return const_cast<T*
>(DynamicCastToGenerated<T>(message_const));
1405template <
typename T>
1407 internal::StrongReference(T::default_instance);
1419Reflection::GetRepeatedPtrFieldInternal<std::string>(
1420 const Message& message,
const FieldDescriptor* field)
const {
1422 MutableRawRepeatedString(
const_cast<Message*
>(&message), field,
true));
1426inline RepeatedPtrField<std::string>*
1427Reflection::MutableRepeatedPtrFieldInternal<std::string>(
1428 Message* message,
const FieldDescriptor* field)
const {
1429 return static_cast<RepeatedPtrField<std::string>*
>(
1430 MutableRawRepeatedString(message, field,
true));
1438 const Message& message,
const FieldDescriptor* field)
const {
1440 message, field, FieldDescriptor::CPPTYPE_MESSAGE, -1,
nullptr));
1445 Message* message,
const FieldDescriptor* field)
const {
1447 message, field, FieldDescriptor::CPPTYPE_MESSAGE, -1,
nullptr));
1450template <
typename PB>
1452 const Message& message,
const FieldDescriptor* field)
const {
1454 GetRawRepeatedField(message, field, FieldDescriptor::CPPTYPE_MESSAGE, -1,
1455 PB::default_instance().GetDescriptor()));
1458template <
typename PB>
1460 Message* message,
const FieldDescriptor* field)
const {
1462 MutableRawRepeatedField(message, field, FieldDescriptor::CPPTYPE_MESSAGE,
1463 -1, PB::default_instance().GetDescriptor()));
1466template <
typename Type>
1467const Type& Reflection::DefaultRaw(
const FieldDescriptor* field)
const {
1468 return *
reinterpret_cast<const Type*
>(schema_.GetFieldDefault(field));
1471uint32_t Reflection::GetOneofCase(
1472 const Message& message,
const OneofDescriptor* oneof_descriptor)
const {
1473 GOOGLE_DCHECK(!oneof_descriptor->is_synthetic());
1474 return internal::GetConstRefAtOffset<uint32_t>(
1475 message, schema_.GetOneofCaseOffset(oneof_descriptor));
1478bool Reflection::HasOneofField(
const Message& message,
1479 const FieldDescriptor* field)
const {
1480 return (GetOneofCase(message, field->containing_oneof()) ==
1481 static_cast<uint32_t
>(field->number()));
1484template <
typename Type>
1485const Type& Reflection::GetRaw(
const Message& message,
1486 const FieldDescriptor* field)
const {
1487 GOOGLE_DCHECK(!schema_.InRealOneof(field) || HasOneofField(message, field))
1488 <<
"Field = " <<
field->full_name();
1489 return internal::GetConstRefAtOffset<Type>(message,
1490 schema_.GetFieldOffset(field));
1495#include <google/protobuf/port_undef.inc>
static MessageFactory * generated_factory()
static void InternalRegisterGeneratedFile(const google::protobuf::internal::DescriptorTable *table)
static void InternalRegisterGeneratedMessage(const Descriptor *descriptor, const Message *prototype)
virtual const Message * GetPrototype(const Descriptor *type)=0
virtual ~MessageFactory()
void CheckTypeAndMergeFrom(const MessageLite &other) override
uint8_t * _InternalSerialize(uint8_t *target, io::EpsCopyOutputStream *stream) const override
virtual Metadata GetMetadata() const =0
void PrintDebugString() const
virtual size_t SpaceUsedLong() const
virtual void MergeFrom(const Message &from)
std::string DebugString() const
Message * New(Arena *arena) const override=0
void DiscardUnknownFields()
size_t ByteSizeLong() const override
std::string Utf8DebugString() const
static void CopyWithSourceCheck(Message &to, const Message &from)
void CheckInitialized() const
const Descriptor * GetDescriptor() const
const char * _InternalParse(const char *ptr, internal::ParseContext *ctx) override
std::string GetTypeName() const override
const Reflection * GetReflection() const
void CopyFrom(const Message &from)
static uint64_t GetInvariantPerBuild(uint64_t salt)
void FindInitializationErrors(std::vector< std::string > *errors) const
Message(Arena *arena, bool is_message_owned=false)
bool IsInitialized() const override
size_t ComputeUnknownFieldsSize(size_t total_size, internal::CachedSize *cached_size) const
static void FailIfCopyFromDescendant(Message &to, const Message &from)
virtual const ClassData * GetClassData() const
std::string InitializationErrorString() const override
std::string ShortDebugString() const
size_t MaybeComputeUnknownFieldsSize(size_t total_size, internal::CachedSize *cached_size) const
int32_t GetRepeatedInt32(const Message &message, const FieldDescriptor *field, int index) const
size_t SpaceUsedLong(const Message &message) const
void SetUInt32(Message *message, const FieldDescriptor *field, uint32_t value) const
float GetFloat(const Message &message, const FieldDescriptor *field) const
const FieldDescriptor * GetOneofFieldDescriptor(const Message &message, const OneofDescriptor *oneof_descriptor) const
std::string GetString(const Message &message, const FieldDescriptor *field) const
uint64_t GetUInt64(const Message &message, const FieldDescriptor *field) const
const std::string & GetStringReference(const Message &message, const FieldDescriptor *field, std::string *scratch) const
int64_t GetInt64(const Message &message, const FieldDescriptor *field) const
uint64_t GetRepeatedUInt64(const Message &message, const FieldDescriptor *field, int index) const
Message * AddMessage(Message *message, const FieldDescriptor *field, MessageFactory *factory=nullptr) const
int FieldSize(const Message &message, const FieldDescriptor *field) const
const Message & GetRepeatedMessage(const Message &message, const FieldDescriptor *field, int index) const
MutableRepeatedFieldRef< T > GetMutableRepeatedFieldRef(Message *message, const FieldDescriptor *field) const
UnknownFieldSet * MutableUnknownFields(Message *message) const
void SetRepeatedInt64(Message *message, const FieldDescriptor *field, int index, int64_t value) const
void ClearField(Message *message, const FieldDescriptor *field) const
void SwapElements(Message *message, const FieldDescriptor *field, int index1, int index2) const
Message * MutableMessage(Message *message, const FieldDescriptor *field, MessageFactory *factory=nullptr) const
friend const char * ParseLenDelim(int field_number, const FieldDescriptor *field, Message *msg, const Reflection *reflection, const char *ptr, internal::ParseContext *ctx)
void SetRepeatedEnumValue(Message *message, const FieldDescriptor *field, int index, int value) const
void SetRepeatedInt32(Message *message, const FieldDescriptor *field, int index, int32_t value) const
void SetInt64(Message *message, const FieldDescriptor *field, int64_t value) const
bool GetBool(const Message &message, const FieldDescriptor *field) const
void AddUInt64(Message *message, const FieldDescriptor *field, uint64_t value) const
void AddInt32(Message *message, const FieldDescriptor *field, int32_t value) const
bool HasField(const Message &message, const FieldDescriptor *field) const
void AddString(Message *message, const FieldDescriptor *field, std::string value) const
void UnsafeArenaAddAllocatedMessage(Message *message, const FieldDescriptor *field, Message *new_entry) const
RepeatedFieldRef< T > GetRepeatedFieldRef(const Message &message, const FieldDescriptor *field) const
void ClearOneof(Message *message, const OneofDescriptor *oneof_descriptor) const
void SetRepeatedEnum(Message *message, const FieldDescriptor *field, int index, const EnumValueDescriptor *value) const
bool HasOneof(const Message &message, const OneofDescriptor *oneof_descriptor) const
void SetRepeatedUInt32(Message *message, const FieldDescriptor *field, int index, uint32_t value) const
const FieldDescriptor * FindKnownExtensionByName(const std::string &name) const
const Message & GetMessage(const Message &message, const FieldDescriptor *field, MessageFactory *factory=nullptr) const
friend const char * ParsePackedField(const FieldDescriptor *field, Message *msg, const Reflection *reflection, const char *ptr, internal::ParseContext *ctx)
void AddInt64(Message *message, const FieldDescriptor *field, int64_t value) const
void SetRepeatedString(Message *message, const FieldDescriptor *field, int index, std::string value) const
PROTOBUF_NODISCARD Message * ReleaseLast(Message *message, const FieldDescriptor *field) const
void AddUInt32(Message *message, const FieldDescriptor *field, uint32_t value) const
void SetRepeatedDouble(Message *message, const FieldDescriptor *field, int index, double value) const
void SetInt32(Message *message, const FieldDescriptor *field, int32_t value) const
void SetRepeatedUInt64(Message *message, const FieldDescriptor *field, int index, uint64_t value) const
PROTOBUF_NODISCARD Message * ReleaseMessage(Message *message, const FieldDescriptor *field, MessageFactory *factory=nullptr) const
double GetRepeatedDouble(const Message &message, const FieldDescriptor *field, int index) const
int GetEnumValue(const Message &message, const FieldDescriptor *field) const
void SetDouble(Message *message, const FieldDescriptor *field, double value) const
void SetRepeatedBool(Message *message, const FieldDescriptor *field, int index, bool value) const
void SetRepeatedFloat(Message *message, const FieldDescriptor *field, int index, float value) const
friend void RegisterAllTypesInternal(const Metadata *file_level_metadata, int size)
double GetDouble(const Message &message, const FieldDescriptor *field) const
MessageFactory * GetMessageFactory() const
void UnsafeArenaSetAllocatedMessage(Message *message, Message *sub_message, const FieldDescriptor *field) const
uint32_t GetRepeatedUInt32(const Message &message, const FieldDescriptor *field, int index) const
const std::string & GetRepeatedStringReference(const Message &message, const FieldDescriptor *field, int index, std::string *scratch) const
void SetEnumValue(Message *message, const FieldDescriptor *field, int value) const
void UnsafeArenaSwapFields(Message *lhs, Message *rhs, const std::vector< const FieldDescriptor * > &fields) const
void AddEnumValue(Message *message, const FieldDescriptor *field, int value) const
void SetFloat(Message *message, const FieldDescriptor *field, float value) const
void SetAllocatedMessage(Message *message, Message *sub_message, const FieldDescriptor *field) const
const EnumValueDescriptor * GetRepeatedEnum(const Message &message, const FieldDescriptor *field, int index) const
const EnumValueDescriptor * GetEnum(const Message &message, const FieldDescriptor *field) const
void RemoveLast(Message *message, const FieldDescriptor *field) const
Message * UnsafeArenaReleaseMessage(Message *message, const FieldDescriptor *field, MessageFactory *factory=nullptr) const
const UnknownFieldSet & GetUnknownFields(const Message &message) const
void Swap(Message *message1, Message *message2) const
int64_t GetRepeatedInt64(const Message &message, const FieldDescriptor *field, int index) const
void ListFields(const Message &message, std::vector< const FieldDescriptor * > *output) const
int32_t GetInt32(const Message &message, const FieldDescriptor *field) const
void AddBool(Message *message, const FieldDescriptor *field, bool value) const
Message * MutableRepeatedMessage(Message *message, const FieldDescriptor *field, int index) const
int GetRepeatedEnumValue(const Message &message, const FieldDescriptor *field, int index) const
uint32_t GetUInt32(const Message &message, const FieldDescriptor *field) const
void SetString(Message *message, const FieldDescriptor *field, std::string value) const
void AddAllocatedMessage(Message *message, const FieldDescriptor *field, Message *new_entry) const
void UnsafeArenaSwap(Message *lhs, Message *rhs) const
float GetRepeatedFloat(const Message &message, const FieldDescriptor *field, int index) const
void SwapFields(Message *message1, Message *message2, const std::vector< const FieldDescriptor * > &fields) const
Message * UnsafeArenaReleaseLast(Message *message, const FieldDescriptor *field) const
bool GetRepeatedBool(const Message &message, const FieldDescriptor *field, int index) const
void AddEnum(Message *message, const FieldDescriptor *field, const EnumValueDescriptor *value) const
std::string GetRepeatedString(const Message &message, const FieldDescriptor *field, int index) const
void AddFloat(Message *message, const FieldDescriptor *field, float value) const
void SetUInt64(Message *message, const FieldDescriptor *field, uint64_t value) const
const FieldDescriptor * FindKnownExtensionByNumber(int number) const
void SetEnum(Message *message, const FieldDescriptor *field, const EnumValueDescriptor *value) const
bool SupportsUnknownEnumValues() const
void AddDouble(Message *message, const FieldDescriptor *field, double value) const
void SetBool(Message *message, const FieldDescriptor *field, bool value) const
extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::goby::GobyFieldOptions >, 11, false > field
To * GetPointerAtOffset(Message *message, uint32_t offset)
const To & GetConstRefAtOffset(const Message &message, uint32_t offset)
bool CreateUnknownEnumValues(const FieldDescriptor *field)
PROTOBUF_EXPORT bool IsDescendant(Message &root, const Message &message)
const To * GetConstPointerAtOffset(const Message *message, uint32_t offset)
const T * DynamicCastToGenerated(const Message *from)
void LinkMessageReflection()
#define DECLARE_GET_REPEATED_FIELD(TYPE)