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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
77 deletions
+1
-77
csharp_helpers.cc
src/google/protobuf/compiler/csharp/csharp_helpers.cc
+1
-3
descriptor.pb.cc
src/google/protobuf/descriptor.pb.cc
+0
-0
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) {
}
std
::
string
GetPropertyName
(
const
FieldDescriptor
*
descriptor
)
{
if
(
descriptor
->
options
().
has_csharp_property_name
())
{
return
descriptor
->
options
().
csharp_property_name
();
}
// TODO(jtattermusch): consider introducing csharp_property_name field option
std
::
string
property_name
=
UnderscoresToPascalCase
(
GetFieldName
(
descriptor
));
if
(
property_name
==
descriptor
->
containing_type
()
->
name
())
{
property_name
+=
"_"
;
...
...
src/google/protobuf/descriptor.pb.cc
View file @
83a5991d
This diff is collapsed.
Click to expand it.
src/google/protobuf/descriptor.pb.h
View file @
83a5991d
...
...
@@ -2196,18 +2196,6 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message {
bool
weak
()
const
;
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;
int
uninterpreted_option_size
()
const
;
void
clear_uninterpreted_option
();
...
...
@@ -2233,8 +2221,6 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message {
inline
void
clear_has_deprecated
();
inline
void
set_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_
;
...
...
@@ -2246,7 +2232,6 @@ class LIBPROTOBUF_EXPORT FieldOptions : public ::google::protobuf::Message {
bool
lazy_
;
bool
deprecated_
;
bool
weak_
;
::
google
::
protobuf
::
internal
::
ArenaStringPtr
csharp_property_name_
;
::
google
::
protobuf
::
RepeatedPtrField
<
::
google
::
protobuf
::
UninterpretedOption
>
uninterpreted_option_
;
friend
void
LIBPROTOBUF_EXPORT
protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto
();
friend
void
protobuf_AssignDesc_google_2fprotobuf_2fdescriptor_2eproto
();
...
...
@@ -5938,59 +5923,6 @@ inline void FieldOptions::set_weak(bool value) {
// @@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;
inline
int
FieldOptions
::
uninterpreted_option_size
()
const
{
return
uninterpreted_option_
.
size
();
...
...
src/google/protobuf/descriptor.proto
View file @
83a5991d
...
...
@@ -491,12 +491,6 @@ message FieldOptions {
// For Google-internal migration only. Do not use.
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.
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