Commit b3c132f6 authored by Adam Cozzette's avatar Adam Cozzette Committed by Paul Yang

Avoid marking generated C++ messages as final for now (#5928)

We need to mark messages as final soon, but before we do that we need to
provide a temporary opt-out mechanism to accommodate existing code that
inherits from generated messages. For 3.7.1 let's stop marking messages
final but in 3.8 we can reintroduce "final" with an opt-out option.
parent 059851fe
......@@ -62,7 +62,7 @@ namespace protobuf {
// ===================================================================
class PROTOBUF_EXPORT Any final :
class PROTOBUF_EXPORT Any :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ {
public:
Any();
......
......@@ -71,7 +71,7 @@ namespace protobuf {
// ===================================================================
class PROTOBUF_EXPORT Api final :
class PROTOBUF_EXPORT Api :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Api) */ {
public:
Api();
......@@ -262,7 +262,7 @@ class PROTOBUF_EXPORT Api final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT Method final :
class PROTOBUF_EXPORT Method :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Method) */ {
public:
Method();
......@@ -446,7 +446,7 @@ class PROTOBUF_EXPORT Method final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT Mixin final :
class PROTOBUF_EXPORT Mixin :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Mixin) */ {
public:
Mixin();
......
......@@ -246,7 +246,7 @@ bool HasPrivateHasMethod(const FieldDescriptor* field) {
bool ShouldMarkClassAsFinal(const Descriptor* descriptor,
const Options& options) {
return true;
return false;
}
bool ShouldMarkClearAsFinal(const Descriptor* descriptor,
......
......@@ -83,7 +83,7 @@ namespace compiler {
// ===================================================================
class PROTOC_EXPORT Version final :
class PROTOC_EXPORT Version :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.Version) */ {
public:
Version();
......@@ -236,7 +236,7 @@ class PROTOC_EXPORT Version final :
};
// -------------------------------------------------------------------
class PROTOC_EXPORT CodeGeneratorRequest final :
class PROTOC_EXPORT CodeGeneratorRequest :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorRequest) */ {
public:
CodeGeneratorRequest();
......@@ -411,7 +411,7 @@ class PROTOC_EXPORT CodeGeneratorRequest final :
};
// -------------------------------------------------------------------
class PROTOC_EXPORT CodeGeneratorResponse_File final :
class PROTOC_EXPORT CodeGeneratorResponse_File :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorResponse.File) */ {
public:
CodeGeneratorResponse_File();
......@@ -572,7 +572,7 @@ class PROTOC_EXPORT CodeGeneratorResponse_File final :
};
// -------------------------------------------------------------------
class PROTOC_EXPORT CodeGeneratorResponse final :
class PROTOC_EXPORT CodeGeneratorResponse :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.compiler.CodeGeneratorResponse) */ {
public:
CodeGeneratorResponse();
......
This diff is collapsed.
......@@ -61,7 +61,7 @@ namespace protobuf {
// ===================================================================
class PROTOBUF_EXPORT Duration final :
class PROTOBUF_EXPORT Duration :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Duration) */ {
public:
Duration();
......
......@@ -61,7 +61,7 @@ namespace protobuf {
// ===================================================================
class PROTOBUF_EXPORT Empty final :
class PROTOBUF_EXPORT Empty :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Empty) */ {
public:
Empty();
......
......@@ -61,7 +61,7 @@ namespace protobuf {
// ===================================================================
class PROTOBUF_EXPORT FieldMask final :
class PROTOBUF_EXPORT FieldMask :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FieldMask) */ {
public:
FieldMask();
......
......@@ -61,7 +61,7 @@ namespace protobuf {
// ===================================================================
class PROTOBUF_EXPORT SourceContext final :
class PROTOBUF_EXPORT SourceContext :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.SourceContext) */ {
public:
SourceContext();
......
......@@ -121,7 +121,7 @@ static bool _ParseMap(const char* begin, const char* end, void* object, ::google
// -------------------------------------------------------------------
class PROTOBUF_EXPORT Struct final :
class PROTOBUF_EXPORT Struct :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Struct) */ {
public:
Struct();
......@@ -257,7 +257,7 @@ class PROTOBUF_EXPORT Struct final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT Value final :
class PROTOBUF_EXPORT Value :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Value) */ {
public:
Value();
......@@ -486,7 +486,7 @@ class PROTOBUF_EXPORT Value final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT ListValue final :
class PROTOBUF_EXPORT ListValue :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ListValue) */ {
public:
ListValue();
......
......@@ -61,7 +61,7 @@ namespace protobuf {
// ===================================================================
class PROTOBUF_EXPORT Timestamp final :
class PROTOBUF_EXPORT Timestamp :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Timestamp) */ {
public:
Timestamp();
......
......@@ -162,7 +162,7 @@ inline bool Syntax_Parse(
}
// ===================================================================
class PROTOBUF_EXPORT Type final :
class PROTOBUF_EXPORT Type :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Type) */ {
public:
Type();
......@@ -375,7 +375,7 @@ class PROTOBUF_EXPORT Type final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT Field final :
class PROTOBUF_EXPORT Field :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Field) */ {
public:
Field();
......@@ -729,7 +729,7 @@ class PROTOBUF_EXPORT Field final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT Enum final :
class PROTOBUF_EXPORT Enum :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Enum) */ {
public:
Enum();
......@@ -919,7 +919,7 @@ class PROTOBUF_EXPORT Enum final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT EnumValue final :
class PROTOBUF_EXPORT EnumValue :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.EnumValue) */ {
public:
EnumValue();
......@@ -1083,7 +1083,7 @@ class PROTOBUF_EXPORT EnumValue final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT Option final :
class PROTOBUF_EXPORT Option :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Option) */ {
public:
Option();
......
......@@ -93,7 +93,7 @@ namespace protobuf {
// ===================================================================
class PROTOBUF_EXPORT DoubleValue final :
class PROTOBUF_EXPORT DoubleValue :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DoubleValue) */ {
public:
DoubleValue();
......@@ -220,7 +220,7 @@ class PROTOBUF_EXPORT DoubleValue final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT FloatValue final :
class PROTOBUF_EXPORT FloatValue :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FloatValue) */ {
public:
FloatValue();
......@@ -347,7 +347,7 @@ class PROTOBUF_EXPORT FloatValue final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT Int64Value final :
class PROTOBUF_EXPORT Int64Value :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Int64Value) */ {
public:
Int64Value();
......@@ -474,7 +474,7 @@ class PROTOBUF_EXPORT Int64Value final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT UInt64Value final :
class PROTOBUF_EXPORT UInt64Value :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UInt64Value) */ {
public:
UInt64Value();
......@@ -601,7 +601,7 @@ class PROTOBUF_EXPORT UInt64Value final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT Int32Value final :
class PROTOBUF_EXPORT Int32Value :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Int32Value) */ {
public:
Int32Value();
......@@ -728,7 +728,7 @@ class PROTOBUF_EXPORT Int32Value final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT UInt32Value final :
class PROTOBUF_EXPORT UInt32Value :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UInt32Value) */ {
public:
UInt32Value();
......@@ -855,7 +855,7 @@ class PROTOBUF_EXPORT UInt32Value final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT BoolValue final :
class PROTOBUF_EXPORT BoolValue :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.BoolValue) */ {
public:
BoolValue();
......@@ -982,7 +982,7 @@ class PROTOBUF_EXPORT BoolValue final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT StringValue final :
class PROTOBUF_EXPORT StringValue :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.StringValue) */ {
public:
StringValue();
......@@ -1126,7 +1126,7 @@ class PROTOBUF_EXPORT StringValue final :
};
// -------------------------------------------------------------------
class PROTOBUF_EXPORT BytesValue final :
class PROTOBUF_EXPORT BytesValue :
public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.BytesValue) */ {
public:
BytesValue();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment