aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/descriptor.h
diff options
context:
space:
mode:
authorAdam Cozzette <acozzette@google.com>2016-06-29 15:23:27 -0700
committerAdam Cozzette <acozzette@google.com>2016-06-29 15:38:03 -0700
commitd64a2d9941c36a7bc2a7959ea10ab8363192ac14 (patch)
tree52330d146ad63d3d70f3baade00d5d1fea8f5e0c /src/google/protobuf/descriptor.h
parentc18aa7795a2e02ef700ff8b039d94ecdcc33432f (diff)
downloadprotobuf-d64a2d9941c36a7bc2a7959ea10ab8363192ac14.tar.gz
protobuf-d64a2d9941c36a7bc2a7959ea10ab8363192ac14.tar.bz2
protobuf-d64a2d9941c36a7bc2a7959ea10ab8363192ac14.zip
Integrated internal changes from Google
This includes all internal changes from around May 20 to now.
Diffstat (limited to 'src/google/protobuf/descriptor.h')
-rw-r--r--src/google/protobuf/descriptor.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/google/protobuf/descriptor.h b/src/google/protobuf/descriptor.h
index 3ecc0a9c..b040b62c 100644
--- a/src/google/protobuf/descriptor.h
+++ b/src/google/protobuf/descriptor.h
@@ -62,7 +62,6 @@
#include <string>
#include <vector>
#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/stubs/scoped_ptr.h>
// TYPE_BOOL is defined in the MacOS's ConditionalMacros.h.
#ifdef TYPE_BOOL
@@ -95,6 +94,7 @@ class MethodDescriptorProto;
class FileDescriptorProto;
class MessageOptions;
class FieldOptions;
+class OneofOptions;
class EnumOptions;
class EnumValueOptions;
class ServiceOptions;
@@ -750,6 +750,8 @@ class LIBPROTOBUF_EXPORT OneofDescriptor {
// .proto file. Does not include extensions.
const FieldDescriptor* field(int index) const;
+ const OneofOptions& options() const;
+
// See Descriptor::CopyTo().
void CopyTo(OneofDescriptorProto* proto) const;
@@ -767,6 +769,8 @@ class LIBPROTOBUF_EXPORT OneofDescriptor {
bool GetSourceLocation(SourceLocation* out_location) const;
private:
+ typedef OneofOptions OptionsType;
+
// Allows access to GetLocationPath for annotations.
friend class ::google::protobuf::io::Printer;
@@ -784,6 +788,8 @@ class LIBPROTOBUF_EXPORT OneofDescriptor {
bool is_extendable_;
int field_count_;
const FieldDescriptor** fields_;
+ const OneofOptions* options_;
+
// IMPORTANT: If you add a new field, make sure to search for all instances
// of Allocate<OneofDescriptor>() and AllocateArray<OneofDescriptor>()
// in descriptor.cc and update them to initialize the field.
@@ -1708,6 +1714,7 @@ PROTOBUF_DEFINE_STRING_ACCESSOR(OneofDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(OneofDescriptor, full_name)
PROTOBUF_DEFINE_ACCESSOR(OneofDescriptor, containing_type, const Descriptor*)
PROTOBUF_DEFINE_ACCESSOR(OneofDescriptor, field_count, int)
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(OneofDescriptor, OneofOptions)
PROTOBUF_DEFINE_STRING_ACCESSOR(EnumDescriptor, name)
PROTOBUF_DEFINE_STRING_ACCESSOR(EnumDescriptor, full_name)