From 4de8f55113007fdc8e34107950e605fc0209d465 Mon Sep 17 00:00:00 2001 From: "jieluo@google.com" Date: Fri, 18 Jul 2014 00:47:59 +0000 Subject: down integrate to svn --- src/google/protobuf/dynamic_message.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/google/protobuf/dynamic_message.h') diff --git a/src/google/protobuf/dynamic_message.h b/src/google/protobuf/dynamic_message.h index b3d1e5d2..a09593c3 100644 --- a/src/google/protobuf/dynamic_message.h +++ b/src/google/protobuf/dynamic_message.h @@ -38,6 +38,8 @@ #ifndef GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__ #define GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__ +#include + #include #include @@ -127,6 +129,16 @@ class LIBPROTOBUF_EXPORT DynamicMessageFactory : public MessageFactory { friend class DynamicMessage; const Message* GetPrototypeNoLock(const Descriptor* type); + // Construct default oneof instance for reflection usage if oneof + // is defined. + static void ConstructDefaultOneofInstance(const Descriptor* type, + const int offsets[], + void* default_oneof_instance); + // Delete default oneof instance. Called by ~DynamicMessageFactory. + static void DeleteDefaultOneofInstance(const Descriptor* type, + const int offsets[], + void* default_oneof_instance); + GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DynamicMessageFactory); }; -- cgit v1.2.3