Go to the documentation of this file.
110 #ifndef GOOGLE_PROTOBUF_MESSAGE_H__
111 #define GOOGLE_PROTOBUF_MESSAGE_H__
115 #include <type_traits>
127 #define GOOGLE_PROTOBUF_HAS_ONEOF
128 #define GOOGLE_PROTOBUF_HAS_ARENAS
130 #include <google/protobuf/port_def.inc>
133 #error "You cannot SWIG proto headers"
142 class MessageFactory;
145 class AssignDescriptorsHelper;
146 class DynamicMessageFactory;
150 class MapReflectionTester;
153 struct DescriptorTable;
158 class ZeroCopyInputStream;
159 class ZeroCopyOutputStream;
160 class CodedInputStream;
161 class CodedOutputStream;
164 class MapReflectionFriend;
167 class CelMapReflectionFriend;
171 class MapFieldPrinterHelper;
176 class ReflectionAccessor;
180 class MapFieldReflectionTest;
183 template <
typename T>
186 template <
typename T>
222 if (arena !=
nullptr) {
242 void CheckInitialized()
const;
252 std::string InitializationErrorString()
const override;
274 virtual size_t SpaceUsedLong()
const;
276 PROTOBUF_DEPRECATED_MSG(
"Please use SpaceUsedLong() instead")
289 void PrintDebugString()
const;
296 void Clear()
override;
298 void CheckTypeAndMergeFrom(
const MessageLite& other)
override;
299 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
306 size_t ByteSizeLong()
const override;
317 virtual void SetCachedSize(
int size)
const;
341 virtual Metadata GetMetadata()
const = 0;
351 class RepeatedFieldAccessor;
356 template <
typename T,
typename Enable =
void>
359 template <
typename T,
typename Enable =
void>
414 PROTOBUF_DEPRECATED_MSG(
"Please use SpaceUsedLong() instead")
458 const std::vector<const FieldDescriptor*>&
fields)
const;
473 std::vector<const FieldDescriptor*>*
output)
const;
724 template <
typename T>
730 template <
typename T>
751 template <
typename T>
752 PROTOBUF_DEPRECATED_MSG(
"Please use GetRepeatedFieldRef() instead")
759 template <typename
T>
760 PROTOBUF_DEPRECATED_MSG("Please use GetMutableRepeatedFieldRef() instead")
768 template <typename
T>
769 PROTOBUF_DEPRECATED_MSG("Please use GetRepeatedFieldRef() instead")
777 template <typename
T>
778 PROTOBUF_DEPRECATED_MSG("Please use GetMutableRepeatedFieldRef() instead")
786 PROTOBUF_DEPRECATED_MSG(
787 "Please use
DescriptorPool::FindExtensionByPrintableName instead")
793 PROTOBUF_DEPRECATED_MSG(
827 bool SupportsUnknownEnumValues()
const;
875 const internal::RepeatedFieldAccessor* RepeatedFieldAccessor(
886 int last_non_weak_field_index_;
888 template <typename
T, typename Enable>
890 template <typename
T, typename Enable>
892 friend class ::PROTOBUF_NAMESPACE_ID::MessageLayoutInspector;
895 friend class python::MapReflectionFriend;
896 #define GOOGLE_PROTOBUF_HAS_CEL_MAP_REFLECTION_FRIEND
897 friend class expr::CelMapReflectionFriend;
904 friend class internal::ReflectionAccessor;
917 bool is_string)
const;
963 template <
typename Type>
966 template <
typename Type>
968 template <
typename Type>
975 inline uint32* MutableOneofCase(
1012 template <
typename Type>
1015 template <
typename Type>
1018 template <
typename Type>
1021 template <
typename Type>
1025 template <
typename Type>
1029 template <
typename Type>
1032 template <
typename Type>
1036 template <
typename Type>
1039 template <
typename Type>
1118 static void InternalRegisterGeneratedFile(
1132 #define DECLARE_GET_REPEATED_FIELD(TYPE) \
1134 PROTOBUF_EXPORT const RepeatedField<TYPE>& \
1135 Reflection::GetRepeatedField<TYPE>(const Message& message, \
1136 const FieldDescriptor* field) const; \
1139 PROTOBUF_EXPORT RepeatedField<TYPE>* Reflection::MutableRepeatedField<TYPE>( \
1140 Message * message, const FieldDescriptor* field) const;
1150 #undef DECLARE_GET_REPEATED_FIELD
1159 template <
typename T>
1163 const T& (*get_default_instance)() = &T::default_instance;
1164 (
void)get_default_instance;
1167 const Message* unused =
static_cast<T*
>(
nullptr);
1170 #ifdef GOOGLE_PROTOBUF_NO_RTTI
1171 bool ok = T::default_instance().GetReflection() == from->
GetReflection();
1172 return ok ? down_cast<const T*>(from) :
nullptr;
1174 return dynamic_cast<const T*
>(from);
1178 template <
typename T>
1180 const Message* message_const = from;
1181 return const_cast<T*
>(DynamicCastToGenerated<T>(message_const));
1204 template <
typename T>
1206 typedef const T& GetDefaultInstanceFunction();
1207 GetDefaultInstanceFunction*
volatile unused = &T::default_instance;
1219 inline const RepeatedPtrField<std::string>&
1220 Reflection::GetRepeatedPtrField<std::string>(
1227 inline RepeatedPtrField<std::string>*
1228 Reflection::MutableRepeatedPtrField<std::string>(
1251 template <
typename PB>
1259 template <
typename PB>
1262 return static_cast<RepeatedPtrField<PB>*
>(
1269 #include <google/protobuf/port_undef.inc>
1271 #endif // GOOGLE_PROTOBUF_MESSAGE_H__
#define DECLARE_GET_REPEATED_FIELD(TYPE)
ExtensionSet * GetExtensionSet(MessageLite *msg, int64 extension_offset)
GLuint const GLchar * name
Arena * GetArena(MessageLite *msg, int64 arena_offset)
#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName)
const Reflection * GetReflection() const
static PyObject * CopyFrom(CMessage *self, PyObject *arg)
GLsizei const GLchar *const * string
void SetField(MessageLite *msg, uint32 *has_bits, uint32 has_bit_index, int64 offset, Type value)
std::string GetTypeName()
static PyObject * UnknownFieldSet(CMessage *self)
#define T(upbtypeconst, upbtype, ctype, default_value)
Message * New(Arena *arena) const override
zend_class_entry * message_type
static PyObject * AddMessage(RepeatedCompositeContainer *self, PyObject *value)
static PyObject * FindExtensionByNumber(PyObject *self, PyObject *args)
bool MergePartialFromCodedStream(MessageLite *msg, const ParseTable &table, io::CodedInputStream *input)
int ToIntSize(size_t size)
void LinkMessageReflection()
static PyObject * New(PyTypeObject *type, PyObject *args, PyObject *kwargs)
const void * GetRawRepeatedField(const Message &message, const FieldDescriptor *field, FieldDescriptor::CppType cpptype, int ctype, const Descriptor *message_type) const
const RepeatedPtrField< T > & GetRepeatedPtrField(const Message &, const FieldDescriptor *) const
const FieldDescriptor * field
const SETUP_TEARDOWN_TESTCONTEXT char * key
EnumValueDescriptorProto * AddEnumValue(EnumDescriptorProto *enum_proto, const std::string &name, int number)
InternalDescriptorPool * pool
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
static const upb_fielddef fields[107]
void * MutableRawRepeatedField(Message *message, const FieldDescriptor *field, FieldDescriptor::CppType, int ctype, const Descriptor *message_type) const
const Descriptor * GetDescriptor() const
void SetBit(uint32 *has_bits, uint32 has_bit_index)
EnumDescriptorProto * AddEnum(FileDescriptorProto *file, const std::string &name)
const T * DynamicCastToGenerated(const Message *from)
FieldDescriptorProto * AddField(DescriptorProto *parent, const std::string &name, int number, FieldDescriptorProto::Label label, FieldDescriptorProto::Type type)
void RegisterAllTypesInternal(const Metadata *file_level_metadata, int size)
void ClearOneofField(const ParseTableField &field, Arena *arena, MessageLite *msg)
GLsizei const GLfloat * value
const Descriptor * descriptor_
const upb_json_parsermethod const upb_symtab upb_sink * output
GLenum GLuint GLenum GLsizei const GLchar * message
static ParentDescriptor GetDescriptor(PyContainer *self)
FieldDescriptor::CppType cpp_type(FieldType type)
RepeatedPtrField< T > * MutableRepeatedPtrField(Message *, const FieldDescriptor *) const
Type * MutableField(MessageLite *msg, uint32 *has_bits, uint32 has_bit_index, int64 offset)
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:56