diff options
Diffstat (limited to 'src/google/protobuf/generated_message_reflection.h')
-rw-r--r-- | src/google/protobuf/generated_message_reflection.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/google/protobuf/generated_message_reflection.h b/src/google/protobuf/generated_message_reflection.h index 702f189e..d0b5b43b 100644 --- a/src/google/protobuf/generated_message_reflection.h +++ b/src/google/protobuf/generated_message_reflection.h @@ -142,7 +142,7 @@ class LIBPROTOBUF_EXPORT GeneratedMessageReflection : public Reflection { void ClearField(Message* message, const FieldDescriptor* field) const; void RemoveLast(Message* message, const FieldDescriptor* field) const; void Swap(Message* message1, Message* message2) const; - void SwapElements(Message* message, const FieldDescriptor* field, + void SwapElements(Message* message, const FieldDescriptor* field, int index1, int index2) const; void ListFields(const Message& message, vector<const FieldDescriptor*>* output) const; @@ -314,20 +314,24 @@ class LIBPROTOBUF_EXPORT GeneratedMessageReflection : public Reflection { inline Type* MutableField(Message* message, const FieldDescriptor* field) const; template <typename Type> - inline const Type& GetRepeatedField(const Message& message, - const FieldDescriptor* field, - int index) const; + inline Type GetRepeatedField(const Message& message, + const FieldDescriptor* field, + int index) const; + template <typename Type> + inline const Type& GetRepeatedPtrField(const Message& message, + const FieldDescriptor* field, + int index) const; template <typename Type> inline void SetRepeatedField(Message* message, const FieldDescriptor* field, int index, - const Type& value) const; + Type value) const; template <typename Type> inline Type* MutableRepeatedField(Message* message, const FieldDescriptor* field, int index) const; template <typename Type> inline void AddField(Message* message, - const FieldDescriptor* field, const Type& value) const; + const FieldDescriptor* field, Type value) const; template <typename Type> inline Type* AddField(Message* message, const FieldDescriptor* field) const; @@ -388,11 +392,6 @@ inline To dynamic_cast_if_available(From from) { #endif } -// Compute the space used by a string, not including sizeof(string) itself. -// This is slightly complicated because small strings store their data within -// the string object but large strings do not. -LIBPROTOBUF_EXPORT int StringSpaceUsedExcludingSelf(const string& str); - // Helper for EnumType_Parse functions: try to parse the string 'name' as an // enum name of the given type, returning true and filling in value on success, // or returning false and leaving value unchanged on failure. @@ -415,7 +414,6 @@ bool ParseNamedEnum(const EnumDescriptor* descriptor, // descriptor.h. LIBPROTOBUF_EXPORT const string& NameOfEnum(const EnumDescriptor* descriptor, int value); - } // namespace internal } // namespace protobuf |