Commit 83a5991d authored by Jan Tattermusch's avatar Jan Tattermusch

removing csharp_property_name field option

parent b36420ad
......@@ -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 += "_";
......
This diff is collapsed.
......@@ -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();
......
......@@ -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;
......
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