Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
83a5991d
Commit
83a5991d
authored
Apr 17, 2015
by
Jan Tattermusch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing csharp_property_name field option
parent
b36420ad
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
223 deletions
+35
-223
csharp_helpers.cc
src/google/protobuf/compiler/csharp/csharp_helpers.cc
+1
-3
descriptor.pb.cc
src/google/protobuf/descriptor.pb.cc
+34
-146
descriptor.pb.h
src/google/protobuf/descriptor.pb.h
+0
-68
descriptor.proto
src/google/protobuf/descriptor.proto
+0
-6
No files found.
src/google/protobuf/compiler/csharp/csharp_helpers.cc
View file @
83a5991d
...
@@ -257,9 +257,7 @@ std::string GetFieldConstantName(const FieldDescriptor* field) {
...
@@ -257,9 +257,7 @@ std::string GetFieldConstantName(const FieldDescriptor* field) {
}
}
std
::
string
GetPropertyName
(
const
FieldDescriptor
*
descriptor
)
{
std
::
string
GetPropertyName
(
const
FieldDescriptor
*
descriptor
)
{
if
(
descriptor
->
options
().
has_csharp_property_name
())
{
// TODO(jtattermusch): consider introducing csharp_property_name field option
return
descriptor
->
options
().
csharp_property_name
();
}
std
::
string
property_name
=
UnderscoresToPascalCase
(
GetFieldName
(
descriptor
));
std
::
string
property_name
=
UnderscoresToPascalCase
(
GetFieldName
(
descriptor
));
if
(
property_name
==
descriptor
->
containing_type
()
->
name
())
{
if
(
property_name
==
descriptor
->
containing_type
()
->
name
())
{
property_name
+=
"_"
;
property_name
+=
"_"
;
...
...
src/google/protobuf/descriptor.pb.cc
View file @
83a5991d
...
@@ -339,13 +339,12 @@ void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto() {
...
@@ -339,13 +339,12 @@ void protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto() {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
MessageOptions
,
_internal_metadata_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
MessageOptions
,
_internal_metadata_
),
-
1
);
-
1
);
FieldOptions_descriptor_
=
file
->
message_type
(
11
);
FieldOptions_descriptor_
=
file
->
message_type
(
11
);
static
const
int
FieldOptions_offsets_
[
7
]
=
{
static
const
int
FieldOptions_offsets_
[
6
]
=
{
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
FieldOptions
,
ctype_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
FieldOptions
,
ctype_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
FieldOptions
,
packed_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
FieldOptions
,
packed_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
FieldOptions
,
lazy_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
FieldOptions
,
lazy_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
FieldOptions
,
deprecated_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
FieldOptions
,
deprecated_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
FieldOptions
,
weak_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
FieldOptions
,
weak_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
FieldOptions
,
csharp_property_name_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
FieldOptions
,
uninterpreted_option_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
FieldOptions
,
uninterpreted_option_
),
};
};
FieldOptions_reflection_
=
FieldOptions_reflection_
=
...
@@ -689,41 +688,40 @@ void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() {
...
@@ -689,41 +688,40 @@ void protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto() {
"recated
\030\003
\001
(
\010
:
\005
false
\022\021\n\t
map_entry
\030\007
\001
(
\010\022
"
"recated
\030\003
\001
(
\010
:
\005
false
\022\021\n\t
map_entry
\030\007
\001
(
\010\022
"
"C
\n\024
uninterpreted_option
\030\347\007
\003
(
\013
2$.google."
"C
\n\024
uninterpreted_option
\030\347\007
\003
(
\013
2$.google."
"protobuf.UninterpretedOption*
\t\010\350\007\020\200\200\200\200\002\"
"
"protobuf.UninterpretedOption*
\t\010\350\007\020\200\200\200\200\002\"
"
"
\2
76
\002\n\014
FieldOptions
\022
:
\n\005
ctype
\030\001
\001
(
\016
2#.google"
"
\2
40
\002\n\014
FieldOptions
\022
:
\n\005
ctype
\030\001
\001
(
\016
2#.google"
".protobuf.FieldOptions.CType:
\006
STRING
\022\016\n\006
"
".protobuf.FieldOptions.CType:
\006
STRING
\022\016\n\006
"
"packed
\030\002
\001
(
\010\022\023\n\004
lazy
\030\005
\001
(
\010
:
\005
false
\022\031\n\n
dep"
"packed
\030\002
\001
(
\010\022\023\n\004
lazy
\030\005
\001
(
\010
:
\005
false
\022\031\n\n
dep"
"recated
\030\003
\001
(
\010
:
\005
false
\022\023\n\004
weak
\030\n
\001
(
\010
:
\005
fals"
"recated
\030\003
\001
(
\010
:
\005
false
\022\023\n\004
weak
\030\n
\001
(
\010
:
\005
fals"
"e
\022\034\n\024
csharp_property_name
\030\013
\001
(
\t\022
C
\n\024
unint"
"e
\022
C
\n\024
uninterpreted_option
\030\347\007
\003
(
\013
2$.googl"
"erpreted_option
\030\347\007
\003
(
\013
2$.google.protobuf"
"e.protobuf.UninterpretedOption
\"
/
\n\005
CType
\022
"
".UninterpretedOption
\"
/
\n\005
CType
\022\n\n\006
STRING
\020
"
"
\n\n\006
STRING
\020\000\022\010\n\004
CORD
\020\001\022\020\n\014
STRING_PIECE
\020\002
*"
"
\000\022\010\n\004
CORD
\020\001\022\020\n\014
STRING_PIECE
\020\002
*
\t\010\350\007\020\200\200\200\200\002
"
"
\t\010\350\007\020\200\200\200\200\002\"\215\001\n\013
EnumOptions
\022\023\n\013
allow_alia"
"
\"\215\001\n\013
EnumOptions
\022\023\n\013
allow_alias
\030\002
\001
(
\010\022\031\n
"
"s
\030\002
\001
(
\010\022\031\n\n
deprecated
\030\003
\001
(
\010
:
\005
false
\022
C
\n\024
un"
"
\n
deprecated
\030\003
\001
(
\010
:
\005
false
\022
C
\n\024
uninterprete"
"interpreted_option
\030\347\007
\003
(
\013
2$.google.proto"
"d_option
\030\347\007
\003
(
\013
2$.google.protobuf.Uninte"
"buf.UninterpretedOption*
\t\010\350\007\020\200\200\200\200\002\"
}
\n\020
En"
"rpretedOption*
\t\010\350\007\020\200\200\200\200\002\"
}
\n\020
EnumValueOpt"
"umValueOptions
\022\031\n\n
deprecated
\030\001
\001
(
\010
:
\005
fals"
"ions
\022\031\n\n
deprecated
\030\001
\001
(
\010
:
\005
false
\022
C
\n\024
unint"
"e
\022
C
\n\024
uninterpreted_option
\030\347\007
\003
(
\013
2$.googl"
"erpreted_option
\030\347\007
\003
(
\013
2$.google.protobuf"
"e.protobuf.UninterpretedOption*
\t\010\350\007\020\200\200\200\200
"
".UninterpretedOption*
\t\010\350\007\020\200\200\200\200\002\"
{
\n\016
Servi"
"
\002\"
{
\n\016
ServiceOptions
\022\031\n\n
deprecated
\030
!
\001
(
\010
:"
"ceOptions
\022\031\n\n
deprecated
\030
!
\001
(
\010
:
\005
false
\022
C
\n\024
"
"
\005
false
\022
C
\n\024
uninterpreted_option
\030\347\007
\003
(
\013
2$."
"uninterpreted_option
\030\347\007
\003
(
\013
2$.google.pro"
"google.protobuf.UninterpretedOption*
\t\010\350\007
"
"tobuf.UninterpretedOption*
\t\010\350\007\020\200\200\200\200\002\"
z
\n\r
"
"
\020\200\200\200\200\002\"
z
\n\r
MethodOptions
\022\031\n\n
deprecated
\030
! "
"MethodOptions
\022\031\n\n
deprecated
\030
!
\001
(
\010
:
\005
false"
"
\001
(
\010
:
\005
false
\022
C
\n\024
uninterpreted_option
\030\347\007
\003
("
"
\022
C
\n\024
uninterpreted_option
\030\347\007
\003
(
\013
2$.google"
"
\013
2$.google.protobuf.UninterpretedOption*"
".protobuf.UninterpretedOption*
\t\010\350\007\020\200\200\200\200\002
"
"
\t\010\350\007\020\200\200\200\200\002\"\236\002\n\023
UninterpretedOption
\022
;
\n\004
na"
"
\"\236\002\n\023
UninterpretedOption
\022
;
\n\004
name
\030\002
\003
(
\013
2-"
"me
\030\002
\003
(
\013
2-.google.protobuf.Uninterpreted"
".google.protobuf.UninterpretedOption.Nam"
"Option.NamePart
\022\030\n\020
identifier_value
\030\003
\001
("
"ePart
\022\030\n\020
identifier_value
\030\003
\001
(
\t\022\032\n\022
posit"
"
\t\022\032\n\022
positive_int_value
\030\004
\001
(
\004\022\032\n\022
negativ"
"ive_int_value
\030\004
\001
(
\004\022\032\n\022
negative_int_valu"
"e_int_value
\030\005
\001
(
\003\022\024\n\014
double_value
\030\006
\001
(
\001\022
"
"e
\030\005
\001
(
\003\022\024\n\014
double_value
\030\006
\001
(
\001\022\024\n\014
string_"
"
\024\n\014
string_value
\030\007
\001
(
\014\022\027\n\017
aggregate_value"
"value
\030\007
\001
(
\014\022\027\n\017
aggregate_value
\030\010
\001
(
\t\032
3
\n\010
"
"
\030\010
\001
(
\t\032
3
\n\010
NamePart
\022\021\n\t
name_part
\030\001
\002
(
\t\022\024\n
"
"NamePart
\022\021\n\t
name_part
\030\001
\002
(
\t\022\024\n\014
is_extens"
"
\014
is_extension
\030\002
\002
(
\010\"\325\001\n\016
SourceCodeInfo
\022
:"
"ion
\030\002
\002
(
\010\"\325\001\n\016
SourceCodeInfo
\022
:
\n\010
location"
"
\n\010
location
\030\001
\003
(
\013
2(.google.protobuf.Sourc"
"
\030\001
\003
(
\013
2(.google.protobuf.SourceCodeInfo."
"eCodeInfo.Location
\032\206\001\n\010
Location
\022\020\n\004
path
\030
"
"Location
\032\206\001\n\010
Location
\022\020\n\004
path
\030\001
\003
(
\005
B
\002\020\001\022
"
"
\001
\003
(
\005
B
\002\020\001\022\020\n\004
span
\030\002
\003
(
\005
B
\002\020\001\022\030\n\020
leading_c"
"
\020\n\004
span
\030\002
\003
(
\005
B
\002\020\001\022\030\n\020
leading_comments
\030\003
"
"omments
\030\003
\001
(
\t\022\031\n\021
trailing_comments
\030\004
\001
(
\t
"
"
\001
(
\t\022\031\n\021
trailing_comments
\030\004
\001
(
\t\022
!
\n\031
leadin"
"
\022
!
\n\031
leading_detached_comments
\030\006
\003
(
\t
B)
\n\023
c"
"g_detached_comments
\030\006
\003
(
\t
B)
\n\023
com.google."
"om.google.protobufB
\020
DescriptorProtosH
\001
"
,
4678
);
"protobufB
\020
DescriptorProtosH
\001
"
,
4708
);
::
google
::
protobuf
::
MessageFactory
::
InternalRegisterGeneratedFile
(
::
google
::
protobuf
::
MessageFactory
::
InternalRegisterGeneratedFile
(
"google/protobuf/descriptor.proto"
,
&
protobuf_RegisterTypes
);
"google/protobuf/descriptor.proto"
,
&
protobuf_RegisterTypes
);
FileDescriptorSet
::
default_instance_
=
new
FileDescriptorSet
();
FileDescriptorSet
::
default_instance_
=
new
FileDescriptorSet
();
...
@@ -9090,7 +9088,6 @@ const int FieldOptions::kPackedFieldNumber;
...
@@ -9090,7 +9088,6 @@ const int FieldOptions::kPackedFieldNumber;
const
int
FieldOptions
::
kLazyFieldNumber
;
const
int
FieldOptions
::
kLazyFieldNumber
;
const
int
FieldOptions
::
kDeprecatedFieldNumber
;
const
int
FieldOptions
::
kDeprecatedFieldNumber
;
const
int
FieldOptions
::
kWeakFieldNumber
;
const
int
FieldOptions
::
kWeakFieldNumber
;
const
int
FieldOptions
::
kCsharpPropertyNameFieldNumber
;
const
int
FieldOptions
::
kUninterpretedOptionFieldNumber
;
const
int
FieldOptions
::
kUninterpretedOptionFieldNumber
;
#endif // !_MSC_VER
#endif // !_MSC_VER
...
@@ -9112,14 +9109,12 @@ FieldOptions::FieldOptions(const FieldOptions& from)
...
@@ -9112,14 +9109,12 @@ FieldOptions::FieldOptions(const FieldOptions& from)
}
}
void
FieldOptions
::
SharedCtor
()
{
void
FieldOptions
::
SharedCtor
()
{
::
google
::
protobuf
::
internal
::
GetEmptyString
();
_cached_size_
=
0
;
_cached_size_
=
0
;
ctype_
=
0
;
ctype_
=
0
;
packed_
=
false
;
packed_
=
false
;
lazy_
=
false
;
lazy_
=
false
;
deprecated_
=
false
;
deprecated_
=
false
;
weak_
=
false
;
weak_
=
false
;
csharp_property_name_
.
UnsafeSetDefault
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
::
memset
(
_has_bits_
,
0
,
sizeof
(
_has_bits_
));
::
memset
(
_has_bits_
,
0
,
sizeof
(
_has_bits_
));
}
}
...
@@ -9129,7 +9124,6 @@ FieldOptions::~FieldOptions() {
...
@@ -9129,7 +9124,6 @@ FieldOptions::~FieldOptions() {
}
}
void
FieldOptions
::
SharedDtor
()
{
void
FieldOptions
::
SharedDtor
()
{
csharp_property_name_
.
DestroyNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
if
(
this
!=
default_instance_
)
{
if
(
this
!=
default_instance_
)
{
}
}
}
}
...
@@ -9169,11 +9163,8 @@ void FieldOptions::Clear() {
...
@@ -9169,11 +9163,8 @@ void FieldOptions::Clear() {
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)
} while (0)
if
(
_has_bits_
[
0
/
32
]
&
63
)
{
if
(
_has_bits_
[
0
/
32
]
&
31
)
{
ZR_
(
ctype_
,
weak_
);
ZR_
(
ctype_
,
weak_
);
if
(
has_csharp_property_name
())
{
csharp_property_name_
.
ClearToEmptyNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
}
}
}
#undef ZR_HELPER_
#undef ZR_HELPER_
...
@@ -9271,23 +9262,6 @@ bool FieldOptions::MergePartialFromCodedStream(
...
@@ -9271,23 +9262,6 @@ bool FieldOptions::MergePartialFromCodedStream(
}
else
{
}
else
{
goto
handle_unusual
;
goto
handle_unusual
;
}
}
if
(
input
->
ExpectTag
(
90
))
goto
parse_csharp_property_name
;
break
;
}
// optional string csharp_property_name = 11;
case
11
:
{
if
(
tag
==
90
)
{
parse_csharp_property_name
:
DO_
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadString
(
input
,
this
->
mutable_csharp_property_name
()));
::
google
::
protobuf
::
internal
::
WireFormat
::
VerifyUTF8StringNamedField
(
this
->
csharp_property_name
().
data
(),
this
->
csharp_property_name
().
length
(),
::
google
::
protobuf
::
internal
::
WireFormat
::
PARSE
,
"google.protobuf.FieldOptions.csharp_property_name"
);
}
else
{
goto
handle_unusual
;
}
if
(
input
->
ExpectTag
(
7994
))
goto
parse_uninterpreted_option
;
if
(
input
->
ExpectTag
(
7994
))
goto
parse_uninterpreted_option
;
break
;
break
;
}
}
...
@@ -9362,16 +9336,6 @@ void FieldOptions::SerializeWithCachedSizes(
...
@@ -9362,16 +9336,6 @@ void FieldOptions::SerializeWithCachedSizes(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
WriteBool
(
10
,
this
->
weak
(),
output
);
::
google
::
protobuf
::
internal
::
WireFormatLite
::
WriteBool
(
10
,
this
->
weak
(),
output
);
}
}
// optional string csharp_property_name = 11;
if
(
has_csharp_property_name
())
{
::
google
::
protobuf
::
internal
::
WireFormat
::
VerifyUTF8StringNamedField
(
this
->
csharp_property_name
().
data
(),
this
->
csharp_property_name
().
length
(),
::
google
::
protobuf
::
internal
::
WireFormat
::
SERIALIZE
,
"google.protobuf.FieldOptions.csharp_property_name"
);
::
google
::
protobuf
::
internal
::
WireFormatLite
::
WriteStringMaybeAliased
(
11
,
this
->
csharp_property_name
(),
output
);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
for
(
unsigned
int
i
=
0
,
n
=
this
->
uninterpreted_option_size
();
i
<
n
;
i
++
)
{
for
(
unsigned
int
i
=
0
,
n
=
this
->
uninterpreted_option_size
();
i
<
n
;
i
++
)
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
WriteMessageMaybeToArray
(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
WriteMessageMaybeToArray
(
...
@@ -9418,17 +9382,6 @@ void FieldOptions::SerializeWithCachedSizes(
...
@@ -9418,17 +9382,6 @@ void FieldOptions::SerializeWithCachedSizes(
target
=
::
google
::
protobuf
::
internal
::
WireFormatLite
::
WriteBoolToArray
(
10
,
this
->
weak
(),
target
);
target
=
::
google
::
protobuf
::
internal
::
WireFormatLite
::
WriteBoolToArray
(
10
,
this
->
weak
(),
target
);
}
}
// optional string csharp_property_name = 11;
if
(
has_csharp_property_name
())
{
::
google
::
protobuf
::
internal
::
WireFormat
::
VerifyUTF8StringNamedField
(
this
->
csharp_property_name
().
data
(),
this
->
csharp_property_name
().
length
(),
::
google
::
protobuf
::
internal
::
WireFormat
::
SERIALIZE
,
"google.protobuf.FieldOptions.csharp_property_name"
);
target
=
::
google
::
protobuf
::
internal
::
WireFormatLite
::
WriteStringToArray
(
11
,
this
->
csharp_property_name
(),
target
);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
for
(
unsigned
int
i
=
0
,
n
=
this
->
uninterpreted_option_size
();
i
<
n
;
i
++
)
{
for
(
unsigned
int
i
=
0
,
n
=
this
->
uninterpreted_option_size
();
i
<
n
;
i
++
)
{
target
=
::
google
::
protobuf
::
internal
::
WireFormatLite
::
target
=
::
google
::
protobuf
::
internal
::
WireFormatLite
::
...
@@ -9451,7 +9404,7 @@ void FieldOptions::SerializeWithCachedSizes(
...
@@ -9451,7 +9404,7 @@ void FieldOptions::SerializeWithCachedSizes(
int
FieldOptions
::
ByteSize
()
const
{
int
FieldOptions
::
ByteSize
()
const
{
int
total_size
=
0
;
int
total_size
=
0
;
if
(
_has_bits_
[
0
/
32
]
&
63
)
{
if
(
_has_bits_
[
0
/
32
]
&
31
)
{
// optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
// optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
if
(
has_ctype
())
{
if
(
has_ctype
())
{
total_size
+=
1
+
total_size
+=
1
+
...
@@ -9478,13 +9431,6 @@ int FieldOptions::ByteSize() const {
...
@@ -9478,13 +9431,6 @@ int FieldOptions::ByteSize() const {
total_size
+=
1
+
1
;
total_size
+=
1
+
1
;
}
}
// optional string csharp_property_name = 11;
if
(
has_csharp_property_name
())
{
total_size
+=
1
+
::
google
::
protobuf
::
internal
::
WireFormatLite
::
StringSize
(
this
->
csharp_property_name
());
}
}
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
total_size
+=
2
*
this
->
uninterpreted_option_size
();
total_size
+=
2
*
this
->
uninterpreted_option_size
();
...
@@ -9538,10 +9484,6 @@ void FieldOptions::MergeFrom(const FieldOptions& from) {
...
@@ -9538,10 +9484,6 @@ void FieldOptions::MergeFrom(const FieldOptions& from) {
if
(
from
.
has_weak
())
{
if
(
from
.
has_weak
())
{
set_weak
(
from
.
weak
());
set_weak
(
from
.
weak
());
}
}
if
(
from
.
has_csharp_property_name
())
{
set_has_csharp_property_name
();
csharp_property_name_
.
AssignWithDefault
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
from
.
csharp_property_name_
);
}
}
}
_extensions_
.
MergeFrom
(
from
.
_extensions_
);
_extensions_
.
MergeFrom
(
from
.
_extensions_
);
if
(
from
.
_internal_metadata_
.
have_unknown_fields
())
{
if
(
from
.
_internal_metadata_
.
have_unknown_fields
())
{
...
@@ -9578,7 +9520,6 @@ void FieldOptions::InternalSwap(FieldOptions* other) {
...
@@ -9578,7 +9520,6 @@ void FieldOptions::InternalSwap(FieldOptions* other) {
std
::
swap
(
lazy_
,
other
->
lazy_
);
std
::
swap
(
lazy_
,
other
->
lazy_
);
std
::
swap
(
deprecated_
,
other
->
deprecated_
);
std
::
swap
(
deprecated_
,
other
->
deprecated_
);
std
::
swap
(
weak_
,
other
->
weak_
);
std
::
swap
(
weak_
,
other
->
weak_
);
csharp_property_name_
.
Swap
(
&
other
->
csharp_property_name_
);
uninterpreted_option_
.
UnsafeArenaSwap
(
&
other
->
uninterpreted_option_
);
uninterpreted_option_
.
UnsafeArenaSwap
(
&
other
->
uninterpreted_option_
);
std
::
swap
(
_has_bits_
[
0
],
other
->
_has_bits_
[
0
]);
std
::
swap
(
_has_bits_
[
0
],
other
->
_has_bits_
[
0
]);
_internal_metadata_
.
Swap
(
&
other
->
_internal_metadata_
);
_internal_metadata_
.
Swap
(
&
other
->
_internal_metadata_
);
...
@@ -9718,59 +9659,6 @@ void FieldOptions::InternalSwap(FieldOptions* other) {
...
@@ -9718,59 +9659,6 @@ void FieldOptions::InternalSwap(FieldOptions* other) {
// @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.weak)
// @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.weak)
}
}
// optional string csharp_property_name = 11;
bool
FieldOptions
::
has_csharp_property_name
()
const
{
return
(
_has_bits_
[
0
]
&
0x00000020u
)
!=
0
;
}
void
FieldOptions
::
set_has_csharp_property_name
()
{
_has_bits_
[
0
]
|=
0x00000020u
;
}
void
FieldOptions
::
clear_has_csharp_property_name
()
{
_has_bits_
[
0
]
&=
~
0x00000020u
;
}
void
FieldOptions
::
clear_csharp_property_name
()
{
csharp_property_name_
.
ClearToEmptyNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
clear_has_csharp_property_name
();
}
const
::
std
::
string
&
FieldOptions
::
csharp_property_name
()
const
{
// @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.csharp_property_name)
return
csharp_property_name_
.
GetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
}
void
FieldOptions
::
set_csharp_property_name
(
const
::
std
::
string
&
value
)
{
set_has_csharp_property_name
();
csharp_property_name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.csharp_property_name)
}
void
FieldOptions
::
set_csharp_property_name
(
const
char
*
value
)
{
set_has_csharp_property_name
();
csharp_property_name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
// @@protoc_insertion_point(field_set_char:google.protobuf.FieldOptions.csharp_property_name)
}
void
FieldOptions
::
set_csharp_property_name
(
const
char
*
value
,
size_t
size
)
{
set_has_csharp_property_name
();
csharp_property_name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
reinterpret_cast
<
const
char
*>
(
value
),
size
));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldOptions.csharp_property_name)
}
::
std
::
string
*
FieldOptions
::
mutable_csharp_property_name
()
{
set_has_csharp_property_name
();
// @@protoc_insertion_point(field_mutable:google.protobuf.FieldOptions.csharp_property_name)
return
csharp_property_name_
.
MutableNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
}
::
std
::
string
*
FieldOptions
::
release_csharp_property_name
()
{
clear_has_csharp_property_name
();
return
csharp_property_name_
.
ReleaseNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
}
void
FieldOptions
::
set_allocated_csharp_property_name
(
::
std
::
string
*
csharp_property_name
)
{
if
(
csharp_property_name
!=
NULL
)
{
set_has_csharp_property_name
();
}
else
{
clear_has_csharp_property_name
();
}
csharp_property_name_
.
SetAllocatedNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
csharp_property_name
);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldOptions.csharp_property_name)
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
int
FieldOptions
::
uninterpreted_option_size
()
const
{
int
FieldOptions
::
uninterpreted_option_size
()
const
{
return
uninterpreted_option_
.
size
();
return
uninterpreted_option_
.
size
();
...
...
src/google/protobuf/descriptor.pb.h
View file @
83a5991d
...
@@ -2196,18 +2196,6 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message {
...
@@ -2196,18 +2196,6 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message {
bool
weak
()
const
;
bool
weak
()
const
;
void
set_weak
(
bool
value
);
void
set_weak
(
bool
value
);
// optional string csharp_property_name = 11;
bool
has_csharp_property_name
()
const
;
void
clear_csharp_property_name
();
static
const
int
kCsharpPropertyNameFieldNumber
=
11
;
const
::
std
::
string
&
csharp_property_name
()
const
;
void
set_csharp_property_name
(
const
::
std
::
string
&
value
);
void
set_csharp_property_name
(
const
char
*
value
);
void
set_csharp_property_name
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_csharp_property_name
();
::
std
::
string
*
release_csharp_property_name
();
void
set_allocated_csharp_property_name
(
::
std
::
string
*
csharp_property_name
);
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
int
uninterpreted_option_size
()
const
;
int
uninterpreted_option_size
()
const
;
void
clear_uninterpreted_option
();
void
clear_uninterpreted_option
();
...
@@ -2233,8 +2221,6 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message {
...
@@ -2233,8 +2221,6 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message {
inline
void
clear_has_deprecated
();
inline
void
clear_has_deprecated
();
inline
void
set_has_weak
();
inline
void
set_has_weak
();
inline
void
clear_has_weak
();
inline
void
clear_has_weak
();
inline
void
set_has_csharp_property_name
();
inline
void
clear_has_csharp_property_name
();
::
google
::
protobuf
::
internal
::
ExtensionSet
_extensions_
;
::
google
::
protobuf
::
internal
::
ExtensionSet
_extensions_
;
...
@@ -2246,7 +2232,6 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message {
...
@@ -2246,7 +2232,6 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message {
bool
lazy_
;
bool
lazy_
;
bool
deprecated_
;
bool
deprecated_
;
bool
weak_
;
bool
weak_
;
::
google
::
protobuf
::
internal
::
ArenaStringPtr
csharp_property_name_
;
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
UninterpretedOption
>
uninterpreted_option_
;
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
UninterpretedOption
>
uninterpreted_option_
;
friend
void
LIBPROTOBUF_EXPORT
protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto
();
friend
void
LIBPROTOBUF_EXPORT
protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto
();
friend
void
protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto
();
friend
void
protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto
();
...
@@ -5938,59 +5923,6 @@ inline void FieldOptions::set_weak(bool value) {
...
@@ -5938,59 +5923,6 @@ inline void FieldOptions::set_weak(bool value) {
// @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.weak)
// @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.weak)
}
}
// optional string csharp_property_name = 11;
inline
bool
FieldOptions
::
has_csharp_property_name
()
const
{
return
(
_has_bits_
[
0
]
&
0x00000020u
)
!=
0
;
}
inline
void
FieldOptions
::
set_has_csharp_property_name
()
{
_has_bits_
[
0
]
|=
0x00000020u
;
}
inline
void
FieldOptions
::
clear_has_csharp_property_name
()
{
_has_bits_
[
0
]
&=
~
0x00000020u
;
}
inline
void
FieldOptions
::
clear_csharp_property_name
()
{
csharp_property_name_
.
ClearToEmptyNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
clear_has_csharp_property_name
();
}
inline
const
::
std
::
string
&
FieldOptions
::
csharp_property_name
()
const
{
// @@protoc_insertion_point(field_get:google.protobuf.FieldOptions.csharp_property_name)
return
csharp_property_name_
.
GetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
}
inline
void
FieldOptions
::
set_csharp_property_name
(
const
::
std
::
string
&
value
)
{
set_has_csharp_property_name
();
csharp_property_name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.FieldOptions.csharp_property_name)
}
inline
void
FieldOptions
::
set_csharp_property_name
(
const
char
*
value
)
{
set_has_csharp_property_name
();
csharp_property_name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
// @@protoc_insertion_point(field_set_char:google.protobuf.FieldOptions.csharp_property_name)
}
inline
void
FieldOptions
::
set_csharp_property_name
(
const
char
*
value
,
size_t
size
)
{
set_has_csharp_property_name
();
csharp_property_name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
reinterpret_cast
<
const
char
*>
(
value
),
size
));
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldOptions.csharp_property_name)
}
inline
::
std
::
string
*
FieldOptions
::
mutable_csharp_property_name
()
{
set_has_csharp_property_name
();
// @@protoc_insertion_point(field_mutable:google.protobuf.FieldOptions.csharp_property_name)
return
csharp_property_name_
.
MutableNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
}
inline
::
std
::
string
*
FieldOptions
::
release_csharp_property_name
()
{
clear_has_csharp_property_name
();
return
csharp_property_name_
.
ReleaseNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
());
}
inline
void
FieldOptions
::
set_allocated_csharp_property_name
(
::
std
::
string
*
csharp_property_name
)
{
if
(
csharp_property_name
!=
NULL
)
{
set_has_csharp_property_name
();
}
else
{
clear_has_csharp_property_name
();
}
csharp_property_name_
.
SetAllocatedNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
csharp_property_name
);
// @@protoc_insertion_point(field_set_allocated:google.protobuf.FieldOptions.csharp_property_name)
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline
int
FieldOptions
::
uninterpreted_option_size
()
const
{
inline
int
FieldOptions
::
uninterpreted_option_size
()
const
{
return
uninterpreted_option_
.
size
();
return
uninterpreted_option_
.
size
();
...
...
src/google/protobuf/descriptor.proto
View file @
83a5991d
...
@@ -491,12 +491,6 @@ message FieldOptions {
...
@@ -491,12 +491,6 @@ message FieldOptions {
// For Google-internal migration only. Do not use.
// For Google-internal migration only. Do not use.
optional
bool
weak
=
10
[
default
=
false
];
optional
bool
weak
=
10
[
default
=
false
];
// Provides the ability to override the name of the property
// generated for this field. This is applied to all properties
// and methods to do with this field, including HasFoo, FooCount,
// FooList etc.
optional
string
csharp_property_name
=
11
;
// The parser stores options it doesn't recognize here. See above.
// The parser stores options it doesn't recognize here. See above.
repeated
UninterpretedOption
uninterpreted_option
=
999
;
repeated
UninterpretedOption
uninterpreted_option
=
999
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment