Change the C# enum generator inherit from primitive generator

pull/441/head
Jie Luo 10 years ago
parent f7b417ddfe
commit a21a2cf7d3
  1. 704
      csharp/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
  2. 168
      src/google/protobuf/compiler/csharp/csharp_enum_field.cc
  3. 23
      src/google/protobuf/compiler/csharp/csharp_enum_field.h

@ -25,6 +25,8 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto, global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Builder> internal__static_google_protobuf_DescriptorProto__FieldAccessorTable; internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto, global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Builder> internal__static_google_protobuf_DescriptorProto__FieldAccessorTable;
internal static pbd::MessageDescriptor internal__static_google_protobuf_DescriptorProto_ExtensionRange__Descriptor; internal static pbd::MessageDescriptor internal__static_google_protobuf_DescriptorProto_ExtensionRange__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ExtensionRange, global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ExtensionRange.Builder> internal__static_google_protobuf_DescriptorProto_ExtensionRange__FieldAccessorTable; internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ExtensionRange, global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ExtensionRange.Builder> internal__static_google_protobuf_DescriptorProto_ExtensionRange__FieldAccessorTable;
internal static pbd::MessageDescriptor internal__static_google_protobuf_DescriptorProto_ReservedRange__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange, global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange.Builder> internal__static_google_protobuf_DescriptorProto_ReservedRange__FieldAccessorTable;
internal static pbd::MessageDescriptor internal__static_google_protobuf_FieldDescriptorProto__Descriptor; internal static pbd::MessageDescriptor internal__static_google_protobuf_FieldDescriptorProto__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto, global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto.Builder> internal__static_google_protobuf_FieldDescriptorProto__FieldAccessorTable; internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto, global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto.Builder> internal__static_google_protobuf_FieldDescriptorProto__FieldAccessorTable;
internal static pbd::MessageDescriptor internal__static_google_protobuf_OneofDescriptorProto__Descriptor; internal static pbd::MessageDescriptor internal__static_google_protobuf_OneofDescriptorProto__Descriptor;
@ -82,7 +84,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
"KAsyJS5nb29nbGUucHJvdG9idWYuRmllbGREZXNjcmlwdG9yUHJvdG8SLQoH", "KAsyJS5nb29nbGUucHJvdG9idWYuRmllbGREZXNjcmlwdG9yUHJvdG8SLQoH",
"b3B0aW9ucxgIIAEoCzIcLmdvb2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9ucxI5", "b3B0aW9ucxgIIAEoCzIcLmdvb2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9ucxI5",
"ChBzb3VyY2VfY29kZV9pbmZvGAkgASgLMh8uZ29vZ2xlLnByb3RvYnVmLlNv", "ChBzb3VyY2VfY29kZV9pbmZvGAkgASgLMh8uZ29vZ2xlLnByb3RvYnVmLlNv",
"dXJjZUNvZGVJbmZvEg4KBnN5bnRheBgMIAEoCSLkAwoPRGVzY3JpcHRvclBy", "dXJjZUNvZGVJbmZvEg4KBnN5bnRheBgMIAEoCSLwBAoPRGVzY3JpcHRvclBy",
"b3RvEgwKBG5hbWUYASABKAkS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KCGxv",
"IAEoCRIZChF0cmFpbGluZ19jb21tZW50cxgEIAEoCRIhChlsZWFkaW5nX2Rl", "Y2F0aW9uGAEgAygLMiguZ29vZ2xlLnByb3RvYnVmLlNvdXJjZUNvZGVJbmZv",
"dGFjaGVkX2NvbW1lbnRzGAYgAygJQlkKE2NvbS5nb29nbGUucHJvdG9idWZC", "LkxvY2F0aW9uGoYBCghMb2NhdGlvbhIQCgRwYXRoGAEgAygFQgIQARIQCgRz",
"EERlc2NyaXB0b3JQcm90b3NIAaICA0dQQqoCJ0dvb2dsZS5Qcm90b2NvbEJ1", "cGFuGAIgAygFQgIQARIYChBsZWFkaW5nX2NvbW1lbnRzGAMgASgJEhkKEXRy",
"ZmZlcnMuRGVzY3JpcHRvclByb3Rvcw==")); "YWlsaW5nX2NvbW1lbnRzGAQgASgJEiEKGWxlYWRpbmdfZGV0YWNoZWRfY29t",
"bWVudHMYBiADKAlCWQoTY29tLmdvb2dsZS5wcm90b2J1ZkIQRGVzY3JpcHRv",
"clByb3Rvc0gBogIDR1BCqgInR29vZ2xlLlByb3RvY29sQnVmZmVycy5EZXNj",
"cmlwdG9yUHJvdG9z"));
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root; descriptor = root;
internal__static_google_protobuf_FileDescriptorSet__Descriptor = Descriptor.MessageTypes[0]; internal__static_google_protobuf_FileDescriptorSet__Descriptor = Descriptor.MessageTypes[0];
@ -187,11 +195,15 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
internal__static_google_protobuf_DescriptorProto__Descriptor = Descriptor.MessageTypes[2]; internal__static_google_protobuf_DescriptorProto__Descriptor = Descriptor.MessageTypes[2];
internal__static_google_protobuf_DescriptorProto__FieldAccessorTable = internal__static_google_protobuf_DescriptorProto__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto, global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Builder>(internal__static_google_protobuf_DescriptorProto__Descriptor, new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto, global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Builder>(internal__static_google_protobuf_DescriptorProto__Descriptor,
new string[] { "Name", "Field", "Extension", "NestedType", "EnumType", "ExtensionRange", "OneofDecl", "Options", }); new string[] { "Name", "Field", "Extension", "NestedType", "EnumType", "ExtensionRange", "OneofDecl", "Options", "ReservedRange", "ReservedName", });
internal__static_google_protobuf_DescriptorProto_ExtensionRange__Descriptor = internal__static_google_protobuf_DescriptorProto__Descriptor.NestedTypes[0]; internal__static_google_protobuf_DescriptorProto_ExtensionRange__Descriptor = internal__static_google_protobuf_DescriptorProto__Descriptor.NestedTypes[0];
internal__static_google_protobuf_DescriptorProto_ExtensionRange__FieldAccessorTable = internal__static_google_protobuf_DescriptorProto_ExtensionRange__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ExtensionRange, global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ExtensionRange.Builder>(internal__static_google_protobuf_DescriptorProto_ExtensionRange__Descriptor, new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ExtensionRange, global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ExtensionRange.Builder>(internal__static_google_protobuf_DescriptorProto_ExtensionRange__Descriptor,
new string[] { "Start", "End", }); new string[] { "Start", "End", });
internal__static_google_protobuf_DescriptorProto_ReservedRange__Descriptor = internal__static_google_protobuf_DescriptorProto__Descriptor.NestedTypes[1];
internal__static_google_protobuf_DescriptorProto_ReservedRange__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange, global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange.Builder>(internal__static_google_protobuf_DescriptorProto_ReservedRange__Descriptor,
new string[] { "Start", "End", });
internal__static_google_protobuf_FieldDescriptorProto__Descriptor = Descriptor.MessageTypes[3]; internal__static_google_protobuf_FieldDescriptorProto__Descriptor = Descriptor.MessageTypes[3];
internal__static_google_protobuf_FieldDescriptorProto__FieldAccessorTable = internal__static_google_protobuf_FieldDescriptorProto__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto, global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto.Builder>(internal__static_google_protobuf_FieldDescriptorProto__Descriptor, new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto, global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto.Builder>(internal__static_google_protobuf_FieldDescriptorProto__Descriptor,
@ -227,7 +239,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
internal__static_google_protobuf_FieldOptions__Descriptor = Descriptor.MessageTypes[11]; internal__static_google_protobuf_FieldOptions__Descriptor = Descriptor.MessageTypes[11];
internal__static_google_protobuf_FieldOptions__FieldAccessorTable = internal__static_google_protobuf_FieldOptions__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.FieldOptions, global::Google.ProtocolBuffers.DescriptorProtos.FieldOptions.Builder>(internal__static_google_protobuf_FieldOptions__Descriptor, new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.FieldOptions, global::Google.ProtocolBuffers.DescriptorProtos.FieldOptions.Builder>(internal__static_google_protobuf_FieldOptions__Descriptor,
new string[] { "Ctype", "Packed", "Lazy", "Deprecated", "Weak", "UninterpretedOption", }); new string[] { "Ctype", "Packed", "Jstype", "Lazy", "Deprecated", "Weak", "UninterpretedOption", });
internal__static_google_protobuf_EnumOptions__Descriptor = Descriptor.MessageTypes[12]; internal__static_google_protobuf_EnumOptions__Descriptor = Descriptor.MessageTypes[12];
internal__static_google_protobuf_EnumOptions__FieldAccessorTable = internal__static_google_protobuf_EnumOptions__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.EnumOptions, global::Google.ProtocolBuffers.DescriptorProtos.EnumOptions.Builder>(internal__static_google_protobuf_EnumOptions__Descriptor, new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.EnumOptions, global::Google.ProtocolBuffers.DescriptorProtos.EnumOptions.Builder>(internal__static_google_protobuf_EnumOptions__Descriptor,
@ -1563,8 +1575,8 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public sealed partial class DescriptorProto : pb::GeneratedMessage<DescriptorProto, DescriptorProto.Builder> { public sealed partial class DescriptorProto : pb::GeneratedMessage<DescriptorProto, DescriptorProto.Builder> {
private DescriptorProto() { } private DescriptorProto() { }
private static readonly DescriptorProto defaultInstance = new DescriptorProto().MakeReadOnly(); private static readonly DescriptorProto defaultInstance = new DescriptorProto().MakeReadOnly();
private static readonly string[] _descriptorProtoFieldNames = new string[] { "enum_type", "extension", "extension_range", "field", "name", "nested_type", "oneof_decl", "options" }; private static readonly string[] _descriptorProtoFieldNames = new string[] { "enum_type", "extension", "extension_range", "field", "name", "nested_type", "oneof_decl", "options", "reserved_name", "reserved_range" };
private static readonly uint[] _descriptorProtoFieldTags = new uint[] { 34, 50, 42, 18, 10, 26, 66, 58 }; private static readonly uint[] _descriptorProtoFieldTags = new uint[] { 34, 50, 42, 18, 10, 26, 66, 58, 82, 74 };
public static DescriptorProto DefaultInstance { public static DescriptorProto DefaultInstance {
get { return defaultInstance; } get { return defaultInstance; }
} }
@ -1906,6 +1918,324 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
} }
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class ReservedRange : pb::GeneratedMessage<ReservedRange, ReservedRange.Builder> {
private ReservedRange() { }
private static readonly ReservedRange defaultInstance = new ReservedRange().MakeReadOnly();
private static readonly string[] _reservedRangeFieldNames = new string[] { "end", "start" };
private static readonly uint[] _reservedRangeFieldTags = new uint[] { 16, 8 };
public static ReservedRange DefaultInstance {
get { return defaultInstance; }
}
public override ReservedRange DefaultInstanceForType {
get { return DefaultInstance; }
}
protected override ReservedRange ThisMessage {
get { return this; }
}
public static pbd::MessageDescriptor Descriptor {
get { return global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProtoFile.internal__static_google_protobuf_DescriptorProto_ReservedRange__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable<ReservedRange, ReservedRange.Builder> InternalFieldAccessors {
get { return global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProtoFile.internal__static_google_protobuf_DescriptorProto_ReservedRange__FieldAccessorTable; }
}
public const int StartFieldNumber = 1;
private bool hasStart;
private int start_;
public bool HasStart {
get { return hasStart; }
}
public int Start {
get { return start_; }
}
public const int EndFieldNumber = 2;
private bool hasEnd;
private int end_;
public bool HasEnd {
get { return hasEnd; }
}
public int End {
get { return end_; }
}
public override bool IsInitialized {
get {
return true;
}
}
public override void WriteTo(pb::ICodedOutputStream output) {
CalcSerializedSize();
string[] field_names = _reservedRangeFieldNames;
if (hasStart) {
output.WriteInt32(1, field_names[1], Start);
}
if (hasEnd) {
output.WriteInt32(2, field_names[0], End);
}
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
return CalcSerializedSize();
}
}
private int CalcSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasStart) {
size += pb::CodedOutputStream.ComputeInt32Size(1, Start);
}
if (hasEnd) {
size += pb::CodedOutputStream.ComputeInt32Size(2, End);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
public static ReservedRange ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static ReservedRange ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static ReservedRange ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static ReservedRange ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static ReservedRange ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static ReservedRange ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static ReservedRange ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
}
public static ReservedRange ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
}
public static ReservedRange ParseFrom(pb::ICodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static ReservedRange ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
private ReservedRange MakeReadOnly() {
return this;
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(ReservedRange prototype) {
return new Builder(prototype);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Builder : pb::GeneratedBuilder<ReservedRange, Builder> {
protected override Builder ThisBuilder {
get { return this; }
}
public Builder() {
result = DefaultInstance;
resultIsReadOnly = true;
}
internal Builder(ReservedRange cloneFrom) {
result = cloneFrom;
resultIsReadOnly = true;
}
private bool resultIsReadOnly;
private ReservedRange result;
private ReservedRange PrepareBuilder() {
if (resultIsReadOnly) {
ReservedRange original = result;
result = new ReservedRange();
resultIsReadOnly = false;
MergeFrom(original);
}
return result;
}
public override bool IsInitialized {
get { return result.IsInitialized; }
}
protected override ReservedRange MessageBeingBuilt {
get { return PrepareBuilder(); }
}
public override Builder Clear() {
result = DefaultInstance;
resultIsReadOnly = true;
return this;
}
public override Builder Clone() {
if (resultIsReadOnly) {
return new Builder(result);
} else {
return new Builder().MergeFrom(result);
}
}
public override pbd::MessageDescriptor DescriptorForType {
get { return global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange.Descriptor; }
}
public override ReservedRange DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange.DefaultInstance; }
}
public override ReservedRange BuildPartial() {
if (resultIsReadOnly) {
return result;
}
resultIsReadOnly = true;
return result.MakeReadOnly();
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is ReservedRange) {
return MergeFrom((ReservedRange) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(ReservedRange other) {
if (other == global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange.DefaultInstance) return this;
PrepareBuilder();
if (other.HasStart) {
Start = other.Start;
}
if (other.HasEnd) {
End = other.End;
}
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override Builder MergeFrom(pb::ICodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
PrepareBuilder();
pb::UnknownFieldSet.Builder unknownFields = null;
uint tag;
string field_name;
while (input.ReadTag(out tag, out field_name)) {
if(tag == 0 && field_name != null) {
int field_ordinal = global::System.Array.BinarySearch(_reservedRangeFieldNames, field_name, global::System.StringComparer.Ordinal);
if(field_ordinal >= 0)
tag = _reservedRangeFieldTags[field_ordinal];
else {
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
continue;
}
}
switch (tag) {
case 0: {
throw pb::InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
break;
}
case 8: {
result.hasStart = input.ReadInt32(ref result.start_);
break;
}
case 16: {
result.hasEnd = input.ReadInt32(ref result.end_);
break;
}
}
}
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
public bool HasStart {
get { return result.hasStart; }
}
public int Start {
get { return result.Start; }
set { SetStart(value); }
}
public Builder SetStart(int value) {
PrepareBuilder();
result.hasStart = true;
result.start_ = value;
return this;
}
public Builder ClearStart() {
PrepareBuilder();
result.hasStart = false;
result.start_ = 0;
return this;
}
public bool HasEnd {
get { return result.hasEnd; }
}
public int End {
get { return result.End; }
set { SetEnd(value); }
}
public Builder SetEnd(int value) {
PrepareBuilder();
result.hasEnd = true;
result.end_ = value;
return this;
}
public Builder ClearEnd() {
PrepareBuilder();
result.hasEnd = false;
result.end_ = 0;
return this;
}
}
static ReservedRange() {
object.ReferenceEquals(global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProtoFile.Descriptor, null);
}
}
} }
#endregion #endregion
@ -2001,6 +2331,30 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
get { return options_ ?? global::Google.ProtocolBuffers.DescriptorProtos.MessageOptions.DefaultInstance; } get { return options_ ?? global::Google.ProtocolBuffers.DescriptorProtos.MessageOptions.DefaultInstance; }
} }
public const int ReservedRangeFieldNumber = 9;
private pbc::PopsicleList<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange> reservedRange_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange>();
public scg::IList<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange> ReservedRangeList {
get { return reservedRange_; }
}
public int ReservedRangeCount {
get { return reservedRange_.Count; }
}
public global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange GetReservedRange(int index) {
return reservedRange_[index];
}
public const int ReservedNameFieldNumber = 10;
private pbc::PopsicleList<string> reservedName_ = new pbc::PopsicleList<string>();
public scg::IList<string> ReservedNameList {
get { return pbc::Lists.AsReadOnly(reservedName_); }
}
public int ReservedNameCount {
get { return reservedName_.Count; }
}
public string GetReservedName(int index) {
return reservedName_[index];
}
public override bool IsInitialized { public override bool IsInitialized {
get { get {
foreach (global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto element in FieldList) { foreach (global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto element in FieldList) {
@ -2049,6 +2403,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
if (oneofDecl_.Count > 0) { if (oneofDecl_.Count > 0) {
output.WriteMessageArray(8, field_names[6], oneofDecl_); output.WriteMessageArray(8, field_names[6], oneofDecl_);
} }
if (reservedRange_.Count > 0) {
output.WriteMessageArray(9, field_names[9], reservedRange_);
}
if (reservedName_.Count > 0) {
output.WriteStringArray(10, field_names[8], reservedName_);
}
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
@ -2090,6 +2450,17 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
if (hasOptions) { if (hasOptions) {
size += pb::CodedOutputStream.ComputeMessageSize(7, Options); size += pb::CodedOutputStream.ComputeMessageSize(7, Options);
} }
foreach (global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange element in ReservedRangeList) {
size += pb::CodedOutputStream.ComputeMessageSize(9, element);
}
{
int dataSize = 0;
foreach (string element in ReservedNameList) {
dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
}
size += dataSize;
size += 1 * reservedName_.Count;
}
size += UnknownFields.SerializedSize; size += UnknownFields.SerializedSize;
memoizedSerializedSize = size; memoizedSerializedSize = size;
return size; return size;
@ -2131,6 +2502,8 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
enumType_.MakeReadOnly(); enumType_.MakeReadOnly();
extensionRange_.MakeReadOnly(); extensionRange_.MakeReadOnly();
oneofDecl_.MakeReadOnly(); oneofDecl_.MakeReadOnly();
reservedRange_.MakeReadOnly();
reservedName_.MakeReadOnly();
return this; return this;
} }
@ -2242,6 +2615,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
if (other.HasOptions) { if (other.HasOptions) {
MergeOptions(other.Options); MergeOptions(other.Options);
} }
if (other.reservedRange_.Count != 0) {
result.reservedRange_.Add(other.reservedRange_);
}
if (other.reservedName_.Count != 0) {
result.reservedName_.Add(other.reservedName_);
}
this.MergeUnknownFields(other.UnknownFields); this.MergeUnknownFields(other.UnknownFields);
return this; return this;
} }
@ -2322,6 +2701,14 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
input.ReadMessageArray(tag, field_name, result.oneofDecl_, global::Google.ProtocolBuffers.DescriptorProtos.OneofDescriptorProto.DefaultInstance, extensionRegistry); input.ReadMessageArray(tag, field_name, result.oneofDecl_, global::Google.ProtocolBuffers.DescriptorProtos.OneofDescriptorProto.DefaultInstance, extensionRegistry);
break; break;
} }
case 74: {
input.ReadMessageArray(tag, field_name, result.reservedRange_, global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange.DefaultInstance, extensionRegistry);
break;
}
case 82: {
input.ReadStringArray(tag, field_name, result.reservedName_);
break;
}
} }
} }
@ -2656,6 +3043,82 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
result.options_ = null; result.options_ = null;
return this; return this;
} }
public pbc::IPopsicleList<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange> ReservedRangeList {
get { return PrepareBuilder().reservedRange_; }
}
public int ReservedRangeCount {
get { return result.ReservedRangeCount; }
}
public global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange GetReservedRange(int index) {
return result.GetReservedRange(index);
}
public Builder SetReservedRange(int index, global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
PrepareBuilder();
result.reservedRange_[index] = value;
return this;
}
public Builder SetReservedRange(int index, global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange.Builder builderForValue) {
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
PrepareBuilder();
result.reservedRange_[index] = builderForValue.Build();
return this;
}
public Builder AddReservedRange(global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
PrepareBuilder();
result.reservedRange_.Add(value);
return this;
}
public Builder AddReservedRange(global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange.Builder builderForValue) {
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
PrepareBuilder();
result.reservedRange_.Add(builderForValue.Build());
return this;
}
public Builder AddRangeReservedRange(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Types.ReservedRange> values) {
PrepareBuilder();
result.reservedRange_.Add(values);
return this;
}
public Builder ClearReservedRange() {
PrepareBuilder();
result.reservedRange_.Clear();
return this;
}
public pbc::IPopsicleList<string> ReservedNameList {
get { return PrepareBuilder().reservedName_; }
}
public int ReservedNameCount {
get { return result.ReservedNameCount; }
}
public string GetReservedName(int index) {
return result.GetReservedName(index);
}
public Builder SetReservedName(int index, string value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
PrepareBuilder();
result.reservedName_[index] = value;
return this;
}
public Builder AddReservedName(string value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
PrepareBuilder();
result.reservedName_.Add(value);
return this;
}
public Builder AddRangeReservedName(scg::IEnumerable<string> values) {
PrepareBuilder();
result.reservedName_.Add(values);
return this;
}
public Builder ClearReservedName() {
PrepareBuilder();
result.reservedName_.Clear();
return this;
}
} }
static DescriptorProto() { static DescriptorProto() {
object.ReferenceEquals(global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProtoFile.Descriptor, null); object.ReferenceEquals(global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProtoFile.Descriptor, null);
@ -6812,8 +7275,8 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public sealed partial class FieldOptions : pb::ExtendableMessage<FieldOptions, FieldOptions.Builder> { public sealed partial class FieldOptions : pb::ExtendableMessage<FieldOptions, FieldOptions.Builder> {
private FieldOptions() { } private FieldOptions() { }
private static readonly FieldOptions defaultInstance = new FieldOptions().MakeReadOnly(); private static readonly FieldOptions defaultInstance = new FieldOptions().MakeReadOnly();
private static readonly string[] _fieldOptionsFieldNames = new string[] { "ctype", "deprecated", "lazy", "packed", "uninterpreted_option", "weak" }; private static readonly string[] _fieldOptionsFieldNames = new string[] { "ctype", "deprecated", "jstype", "lazy", "packed", "uninterpreted_option", "weak" };
private static readonly uint[] _fieldOptionsFieldTags = new uint[] { 8, 24, 40, 16, 7994, 80 }; private static readonly uint[] _fieldOptionsFieldTags = new uint[] { 8, 24, 48, 40, 16, 7994, 80 };
public static FieldOptions DefaultInstance { public static FieldOptions DefaultInstance {
get { return defaultInstance; } get { return defaultInstance; }
} }
@ -6843,6 +7306,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
STRING_PIECE = 2, STRING_PIECE = 2,
} }
public enum JSType {
JS_NORMAL = 0,
JS_STRING = 1,
JS_NUMBER = 2,
}
} }
#endregion #endregion
@ -6866,6 +7335,16 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
get { return packed_; } get { return packed_; }
} }
public const int JstypeFieldNumber = 6;
private bool hasJstype;
private global::Google.ProtocolBuffers.DescriptorProtos.FieldOptions.Types.JSType jstype_ = global::Google.ProtocolBuffers.DescriptorProtos.FieldOptions.Types.JSType.JS_NORMAL;
public bool HasJstype {
get { return hasJstype; }
}
public global::Google.ProtocolBuffers.DescriptorProtos.FieldOptions.Types.JSType Jstype {
get { return jstype_; }
}
public const int LazyFieldNumber = 5; public const int LazyFieldNumber = 5;
private bool hasLazy; private bool hasLazy;
private bool lazy_; private bool lazy_;
@ -6926,19 +7405,22 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
output.WriteEnum(1, field_names[0], (int) Ctype, Ctype); output.WriteEnum(1, field_names[0], (int) Ctype, Ctype);
} }
if (hasPacked) { if (hasPacked) {
output.WriteBool(2, field_names[3], Packed); output.WriteBool(2, field_names[4], Packed);
} }
if (hasDeprecated) { if (hasDeprecated) {
output.WriteBool(3, field_names[1], Deprecated); output.WriteBool(3, field_names[1], Deprecated);
} }
if (hasLazy) { if (hasLazy) {
output.WriteBool(5, field_names[2], Lazy); output.WriteBool(5, field_names[3], Lazy);
}
if (hasJstype) {
output.WriteEnum(6, field_names[2], (int) Jstype, Jstype);
} }
if (hasWeak) { if (hasWeak) {
output.WriteBool(10, field_names[5], Weak); output.WriteBool(10, field_names[6], Weak);
} }
if (uninterpretedOption_.Count > 0) { if (uninterpretedOption_.Count > 0) {
output.WriteMessageArray(999, field_names[4], uninterpretedOption_); output.WriteMessageArray(999, field_names[5], uninterpretedOption_);
} }
extensionWriter.WriteUntil(536870912, output); extensionWriter.WriteUntil(536870912, output);
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
@ -6964,6 +7446,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
if (hasPacked) { if (hasPacked) {
size += pb::CodedOutputStream.ComputeBoolSize(2, Packed); size += pb::CodedOutputStream.ComputeBoolSize(2, Packed);
} }
if (hasJstype) {
size += pb::CodedOutputStream.ComputeEnumSize(6, (int) Jstype);
}
if (hasLazy) { if (hasLazy) {
size += pb::CodedOutputStream.ComputeBoolSize(5, Lazy); size += pb::CodedOutputStream.ComputeBoolSize(5, Lazy);
} }
@ -7106,6 +7591,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
if (other.HasPacked) { if (other.HasPacked) {
Packed = other.Packed; Packed = other.Packed;
} }
if (other.HasJstype) {
Jstype = other.Jstype;
}
if (other.HasLazy) { if (other.HasLazy) {
Lazy = other.Lazy; Lazy = other.Lazy;
} }
@ -7186,6 +7674,18 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
result.hasLazy = input.ReadBool(ref result.lazy_); result.hasLazy = input.ReadBool(ref result.lazy_);
break; break;
} }
case 48: {
object unknown;
if(input.ReadEnum(ref result.jstype_, out unknown)) {
result.hasJstype = true;
} else if(unknown is int) {
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
unknownFields.MergeVarintField(6, (ulong)(int)unknown);
}
break;
}
case 80: { case 80: {
result.hasWeak = input.ReadBool(ref result.weak_); result.hasWeak = input.ReadBool(ref result.weak_);
break; break;
@ -7244,6 +7744,26 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
return this; return this;
} }
public bool HasJstype {
get { return result.hasJstype; }
}
public global::Google.ProtocolBuffers.DescriptorProtos.FieldOptions.Types.JSType Jstype {
get { return result.Jstype; }
set { SetJstype(value); }
}
public Builder SetJstype(global::Google.ProtocolBuffers.DescriptorProtos.FieldOptions.Types.JSType value) {
PrepareBuilder();
result.hasJstype = true;
result.jstype_ = value;
return this;
}
public Builder ClearJstype() {
PrepareBuilder();
result.hasJstype = false;
result.jstype_ = global::Google.ProtocolBuffers.DescriptorProtos.FieldOptions.Types.JSType.JS_NORMAL;
return this;
}
public bool HasLazy { public bool HasLazy {
get { return result.hasLazy; } get { return result.hasLazy; }
} }

@ -48,81 +48,10 @@ namespace csharp {
EnumFieldGenerator::EnumFieldGenerator(const FieldDescriptor* descriptor, EnumFieldGenerator::EnumFieldGenerator(const FieldDescriptor* descriptor,
int fieldOrdinal) int fieldOrdinal)
: FieldGeneratorBase(descriptor, fieldOrdinal) { : PrimitiveFieldGenerator(descriptor, fieldOrdinal) {
if (SupportFieldPresence(descriptor_->file())) {
has_property_check = "has" + property_name();
} else {
has_property_check = property_name() + " != " + default_value();
}
} }
EnumFieldGenerator::~EnumFieldGenerator() { EnumFieldGenerator::~EnumFieldGenerator() {
}
void EnumFieldGenerator::GenerateMembers(Writer* writer) {
if (SupportFieldPresence(descriptor_->file())) {
writer->WriteLine("private bool has$0$;", property_name());
}
writer->WriteLine("private $0$ $1$_ = $2$;", type_name(), name(),
default_value());
AddDeprecatedFlag(writer);
if (SupportFieldPresence(descriptor_->file())) {
writer->WriteLine("public bool Has$0$ {", property_name());
writer->WriteLine(" get { return has$0$; }", property_name());
writer->WriteLine("}");
}
AddPublicMemberAttributes(writer);
writer->WriteLine("public $0$ $1$ {", type_name(), property_name());
writer->WriteLine(" get { return $0$_; }", name());
writer->WriteLine("}");
}
void EnumFieldGenerator::GenerateBuilderMembers(Writer* writer) {
AddDeprecatedFlag(writer);
if (SupportFieldPresence(descriptor_->file())) {
writer->WriteLine("public bool Has$0$ {", property_name());
writer->WriteLine(" get { return result.has$0$; }", property_name());
writer->WriteLine("}");
}
AddPublicMemberAttributes(writer);
writer->WriteLine("public $0$ $1$ {", type_name(), property_name());
writer->WriteLine(" get { return result.$0$; }", property_name());
writer->WriteLine(" set { Set$0$(value); }", property_name());
writer->WriteLine("}");
AddPublicMemberAttributes(writer);
writer->WriteLine("public Builder Set$0$($1$ value) {", property_name(),
type_name());
writer->WriteLine(" PrepareBuilder();");
if (SupportFieldPresence(descriptor_->file())) {
writer->WriteLine(" result.has$0$ = true;", property_name());
}
writer->WriteLine(" result.$0$_ = value;", name());
writer->WriteLine(" return this;");
writer->WriteLine("}");
AddDeprecatedFlag(writer);
writer->WriteLine("public Builder Clear$0$() {", property_name());
writer->WriteLine(" PrepareBuilder();");
if (SupportFieldPresence(descriptor_->file())) {
writer->WriteLine(" result.has$0$ = false;", property_name());
}
writer->WriteLine(" result.$0$_ = $1$;", name(), default_value());
writer->WriteLine(" return this;");
writer->WriteLine("}");
}
void EnumFieldGenerator::GenerateMergingCode(Writer* writer) {
if (SupportFieldPresence(descriptor_->file())) {
writer->WriteLine("if (other.Has$0$) {", property_name());
} else {
writer->WriteLine("if (other.$0$ != $1$) {", property_name(), default_value());
}
writer->WriteLine(" $0$ = other.$0$;", property_name());
writer->WriteLine("}");
}
void EnumFieldGenerator::GenerateBuildingCode(Writer* writer) {
// Nothing to do here for enum types
} }
void EnumFieldGenerator::GenerateParsingCode(Writer* writer) { void EnumFieldGenerator::GenerateParsingCode(Writer* writer) {
@ -160,91 +89,14 @@ void EnumFieldGenerator::GenerateSerializedSizeCode(Writer* writer) {
writer->WriteLine("}"); writer->WriteLine("}");
} }
void EnumFieldGenerator::WriteHash(Writer* writer) {
writer->WriteLine("if ($0$) {", has_property_check);
writer->WriteLine(" hash ^= $0$_.GetHashCode();", name());
writer->WriteLine("}");
}
void EnumFieldGenerator::WriteEquals(Writer* writer) {
if (SupportFieldPresence(descriptor_->file())) {
writer->WriteLine(
"if (has$0$ != other.has$0$ || (has$0$ && !$1$_.Equals(other.$1$_))) return false;",
property_name(), name());
} else {
writer->WriteLine(
"if (!$0$_.Equals(other.$0$_)) return false;", name());
}
}
void EnumFieldGenerator::WriteToString(Writer* writer) {
writer->WriteLine("PrintField(\"$0$\", $1$, $2$_, writer);",
descriptor_->name(), has_property_check, name());
}
EnumOneofFieldGenerator::EnumOneofFieldGenerator(const FieldDescriptor* descriptor, EnumOneofFieldGenerator::EnumOneofFieldGenerator(const FieldDescriptor* descriptor,
int fieldOrdinal) int fieldOrdinal)
: EnumFieldGenerator(descriptor, fieldOrdinal) { : PrimitiveOneofFieldGenerator(descriptor, fieldOrdinal) {
has_property_check = oneof_name() + "Case_ == " + oneof_property_name() +
"OneofCase." + property_name();
} }
EnumOneofFieldGenerator::~EnumOneofFieldGenerator() { EnumOneofFieldGenerator::~EnumOneofFieldGenerator() {
} }
void EnumOneofFieldGenerator::GenerateMembers(Writer* writer) {
AddDeprecatedFlag(writer);
if (SupportFieldPresence(descriptor_->file())) {
writer->WriteLine("public bool Has$0$ {", property_name());
writer->WriteLine(" get { return $0$; }", has_property_check);
writer->WriteLine("}");
}
AddPublicMemberAttributes(writer);
writer->WriteLine("public $0$ $1$ {", type_name(), property_name());
writer->WriteLine(" get { return $0$ ? ($1$) $2$_ : $3$; }",
has_property_check, type_name(), oneof_name(), default_value());
writer->WriteLine("}");
}
void EnumOneofFieldGenerator::GenerateBuilderMembers(Writer* writer) {
AddDeprecatedFlag(writer);
if (SupportFieldPresence(descriptor_->file())) {
writer->WriteLine("public bool Has$0$ {", property_name());
writer->WriteLine(" get { return result.$0$; }", has_property_check);
writer->WriteLine("}");
}
AddPublicMemberAttributes(writer);
writer->WriteLine("public $0$ $1$ {", type_name(), property_name());
writer->WriteLine(" get { return result.$0$ ? ($1$) result.$2$_ : $3$; }",
has_property_check, type_name(), oneof_name(), default_value());
writer->WriteLine(" set { Set$0$(value); }", property_name());
writer->WriteLine("}");
AddPublicMemberAttributes(writer);
writer->WriteLine("public Builder Set$0$($1$ value) {", property_name(),
type_name());
writer->WriteLine(" PrepareBuilder();");
writer->WriteLine(" result.$0$_ = value;", oneof_name());
writer->WriteLine(" result.$0$Case_ = $1$OneofCase.$2$;",
oneof_name(), oneof_property_name(), property_name());
writer->WriteLine(" return this;");
writer->WriteLine("}");
AddDeprecatedFlag(writer);
writer->WriteLine("public Builder Clear$0$() {", property_name());
writer->WriteLine(" PrepareBuilder();");
writer->WriteLine(" if (result.$0$) {", has_property_check);
writer->WriteLine(" result.$0$Case_ = $1$OneofCase.None;",
oneof_name(), oneof_property_name());
writer->WriteLine(" }");
writer->WriteLine(" return this;");
writer->WriteLine("}");
}
void EnumOneofFieldGenerator::WriteEquals(Writer* writer) {
writer->WriteLine("if (!$0$.Equals(other.$0$)) return false;", property_name());
}
void EnumOneofFieldGenerator::WriteToString(Writer* writer) {
writer->WriteLine("PrintField(\"$0$\", $1$, $2$_, writer);",
descriptor_->name(), has_property_check, oneof_name());
}
void EnumOneofFieldGenerator::GenerateParsingCode(Writer* writer) { void EnumOneofFieldGenerator::GenerateParsingCode(Writer* writer) {
writer->WriteLine("object unknown;"); writer->WriteLine("object unknown;");
writer->WriteLine("$0$ enumValue = $1$;", type_name(), default_value()); writer->WriteLine("$0$ enumValue = $1$;", type_name(), default_value());
@ -266,6 +118,22 @@ void EnumOneofFieldGenerator::GenerateParsingCode(Writer* writer) {
writer->WriteLine("}"); writer->WriteLine("}");
} }
void EnumOneofFieldGenerator::GenerateSerializationCode(Writer* writer) {
writer->WriteLine("if ($0$) {", has_property_check);
writer->WriteLine(
" output.WriteEnum($0$, field_names[$2$], (int) $1$, $1$);", number(),
property_name(), field_ordinal());
writer->WriteLine("}");
}
void EnumOneofFieldGenerator::GenerateSerializedSizeCode(Writer* writer) {
writer->WriteLine("if ($0$) {", has_property_check);
writer->WriteLine(
" size += pb::CodedOutputStream.ComputeEnumSize($0$, (int) $1$);",
number(), property_name());
writer->WriteLine("}");
}
} // namespace csharp } // namespace csharp
} // namespace compiler } // namespace compiler
} // namespace protobuf } // namespace protobuf

@ -34,7 +34,7 @@
#include <string> #include <string>
#include <google/protobuf/compiler/code_generator.h> #include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/csharp/csharp_field_base.h> #include <google/protobuf/compiler/csharp/csharp_primitive_field.h>
namespace google { namespace google {
namespace protobuf { namespace protobuf {
@ -43,40 +43,27 @@ namespace csharp {
class Writer; class Writer;
class EnumFieldGenerator : public FieldGeneratorBase { class EnumFieldGenerator : public PrimitiveFieldGenerator {
public: public:
EnumFieldGenerator(const FieldDescriptor* descriptor, int fieldOrdinal); EnumFieldGenerator(const FieldDescriptor* descriptor, int fieldOrdinal);
~EnumFieldGenerator(); ~EnumFieldGenerator();
virtual void GenerateMembers(Writer* writer);
virtual void GenerateBuilderMembers(Writer* writer);
virtual void GenerateMergingCode(Writer* writer);
virtual void GenerateBuildingCode(Writer* writer);
virtual void GenerateParsingCode(Writer* writer); virtual void GenerateParsingCode(Writer* writer);
virtual void GenerateSerializationCode(Writer* writer); virtual void GenerateSerializationCode(Writer* writer);
virtual void GenerateSerializedSizeCode(Writer* writer); virtual void GenerateSerializedSizeCode(Writer* writer);
virtual void WriteHash(Writer* writer);
virtual void WriteEquals(Writer* writer);
virtual void WriteToString(Writer* writer);
protected:
string has_property_check;
private: private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator);
}; };
class EnumOneofFieldGenerator : public EnumFieldGenerator { class EnumOneofFieldGenerator : public PrimitiveOneofFieldGenerator {
public: public:
EnumOneofFieldGenerator(const FieldDescriptor* descriptor, int fieldOrdinal); EnumOneofFieldGenerator(const FieldDescriptor* descriptor, int fieldOrdinal);
~EnumOneofFieldGenerator(); ~EnumOneofFieldGenerator();
virtual void GenerateMembers(Writer* writer);
virtual void GenerateBuilderMembers(Writer* writer);
virtual void WriteEquals(Writer* writer);
virtual void WriteToString(Writer* writer);
virtual void GenerateParsingCode(Writer* writer); virtual void GenerateParsingCode(Writer* writer);
virtual void GenerateSerializationCode(Writer* writer);
virtual void GenerateSerializedSizeCode(Writer* writer);
private: private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumOneofFieldGenerator); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumOneofFieldGenerator);

Loading…
Cancel
Save