From 183d31cbdb5197b1a014893a91198e970379f656 Mon Sep 17 00:00:00 2001 From: Chris Kennelly Date: Thu, 15 Dec 2016 16:17:17 -0800 Subject: Add rvalue setters for non-arena strings on C++11. --- src/google/protobuf/any.pb.cc | 16 ++ src/google/protobuf/any.pb.h | 22 ++ src/google/protobuf/api.pb.cc | 56 ++++ src/google/protobuf/api.pb.h | 77 +++++ src/google/protobuf/arenastring.h | 10 + .../protobuf/compiler/cpp/cpp_string_field.cc | 32 ++- src/google/protobuf/compiler/cpp/cpp_unittest.cc | 46 +++ src/google/protobuf/compiler/plugin.pb.cc | 48 ++++ src/google/protobuf/compiler/plugin.pb.h | 66 +++++ src/google/protobuf/descriptor.pb.cc | 232 +++++++++++++++ src/google/protobuf/descriptor.pb.h | 319 +++++++++++++++++++++ src/google/protobuf/source_context.pb.cc | 8 + src/google/protobuf/source_context.pb.h | 11 + 13 files changed, 942 insertions(+), 1 deletion(-) (limited to 'src/google') diff --git a/src/google/protobuf/any.pb.cc b/src/google/protobuf/any.pb.cc index e73ebffd..2f0b5e8d 100644 --- a/src/google/protobuf/any.pb.cc +++ b/src/google/protobuf/any.pb.cc @@ -416,6 +416,14 @@ void Any::set_type_url(const ::std::string& value) { type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url) } +#if LANG_CXX11 +void Any::set_type_url(::std::string&& value) { + + type_url_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url) +} +#endif void Any::set_type_url(const char* value) { type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -460,6 +468,14 @@ void Any::set_value(const ::std::string& value) { value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Any.value) } +#if LANG_CXX11 +void Any::set_value(::std::string&& value) { + + value_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value) +} +#endif void Any::set_value(const char* value) { value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); diff --git a/src/google/protobuf/any.pb.h b/src/google/protobuf/any.pb.h index 0d8deab6..48bb3c4f 100644 --- a/src/google/protobuf/any.pb.h +++ b/src/google/protobuf/any.pb.h @@ -127,6 +127,9 @@ class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_in static const int kTypeUrlFieldNumber = 1; const ::std::string& type_url() const; void set_type_url(const ::std::string& value); + #if LANG_CXX11 + void set_type_url(::std::string&& value); + #endif void set_type_url(const char* value); void set_type_url(const char* value, size_t size); ::std::string* mutable_type_url(); @@ -138,6 +141,9 @@ class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_in static const int kValueFieldNumber = 2; const ::std::string& value() const; void set_value(const ::std::string& value); + #if LANG_CXX11 + void set_value(::std::string&& value); + #endif void set_value(const char* value); void set_value(const void* value, size_t size); ::std::string* mutable_value(); @@ -179,6 +185,14 @@ inline void Any::set_type_url(const ::std::string& value) { type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url) } +#if LANG_CXX11 +inline void Any::set_type_url(::std::string&& value) { + + type_url_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url) +} +#endif inline void Any::set_type_url(const char* value) { type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -223,6 +237,14 @@ inline void Any::set_value(const ::std::string& value) { value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Any.value) } +#if LANG_CXX11 +inline void Any::set_value(::std::string&& value) { + + value_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value) +} +#endif inline void Any::set_value(const char* value) { value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); diff --git a/src/google/protobuf/api.pb.cc b/src/google/protobuf/api.pb.cc index 2bc6153a..f0254fa3 100644 --- a/src/google/protobuf/api.pb.cc +++ b/src/google/protobuf/api.pb.cc @@ -684,6 +684,14 @@ void Api::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Api.name) } +#if LANG_CXX11 +void Api::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Api.name) +} +#endif void Api::set_name(const char* value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -788,6 +796,14 @@ void Api::set_version(const ::std::string& value) { version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Api.version) } +#if LANG_CXX11 +void Api::set_version(::std::string&& value) { + + version_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Api.version) +} +#endif void Api::set_version(const char* value) { version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -1408,6 +1424,14 @@ void Method::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Method.name) } +#if LANG_CXX11 +void Method::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.name) +} +#endif void Method::set_name(const char* value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -1452,6 +1476,14 @@ void Method::set_request_type_url(const ::std::string& value) { request_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Method.request_type_url) } +#if LANG_CXX11 +void Method::set_request_type_url(::std::string&& value) { + + request_type_url_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.request_type_url) +} +#endif void Method::set_request_type_url(const char* value) { request_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -1510,6 +1542,14 @@ void Method::set_response_type_url(const ::std::string& value) { response_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Method.response_type_url) } +#if LANG_CXX11 +void Method::set_response_type_url(::std::string&& value) { + + response_type_url_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.response_type_url) +} +#endif void Method::set_response_type_url(const char* value) { response_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -1897,6 +1937,14 @@ void Mixin::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Mixin.name) } +#if LANG_CXX11 +void Mixin::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Mixin.name) +} +#endif void Mixin::set_name(const char* value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -1941,6 +1989,14 @@ void Mixin::set_root(const ::std::string& value) { root_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Mixin.root) } +#if LANG_CXX11 +void Mixin::set_root(::std::string&& value) { + + root_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Mixin.root) +} +#endif void Mixin::set_root(const char* value) { root_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); diff --git a/src/google/protobuf/api.pb.h b/src/google/protobuf/api.pb.h index f4699a5c..16347dda 100644 --- a/src/google/protobuf/api.pb.h +++ b/src/google/protobuf/api.pb.h @@ -142,6 +142,9 @@ class LIBPROTOBUF_EXPORT Api : public ::google::protobuf::Message /* @@protoc_in static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); @@ -177,6 +180,9 @@ class LIBPROTOBUF_EXPORT Api : public ::google::protobuf::Message /* @@protoc_in static const int kVersionFieldNumber = 4; const ::std::string& version() const; void set_version(const ::std::string& value); + #if LANG_CXX11 + void set_version(::std::string&& value); + #endif void set_version(const char* value); void set_version(const char* value, size_t size); ::std::string* mutable_version(); @@ -301,6 +307,9 @@ class LIBPROTOBUF_EXPORT Method : public ::google::protobuf::Message /* @@protoc static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); @@ -312,6 +321,9 @@ class LIBPROTOBUF_EXPORT Method : public ::google::protobuf::Message /* @@protoc static const int kRequestTypeUrlFieldNumber = 2; const ::std::string& request_type_url() const; void set_request_type_url(const ::std::string& value); + #if LANG_CXX11 + void set_request_type_url(::std::string&& value); + #endif void set_request_type_url(const char* value); void set_request_type_url(const char* value, size_t size); ::std::string* mutable_request_type_url(); @@ -329,6 +341,9 @@ class LIBPROTOBUF_EXPORT Method : public ::google::protobuf::Message /* @@protoc static const int kResponseTypeUrlFieldNumber = 4; const ::std::string& response_type_url() const; void set_response_type_url(const ::std::string& value); + #if LANG_CXX11 + void set_response_type_url(::std::string&& value); + #endif void set_response_type_url(const char* value); void set_response_type_url(const char* value, size_t size); ::std::string* mutable_response_type_url(); @@ -450,6 +465,9 @@ class LIBPROTOBUF_EXPORT Mixin : public ::google::protobuf::Message /* @@protoc_ static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); @@ -461,6 +479,9 @@ class LIBPROTOBUF_EXPORT Mixin : public ::google::protobuf::Message /* @@protoc_ static const int kRootFieldNumber = 2; const ::std::string& root() const; void set_root(const ::std::string& value); + #if LANG_CXX11 + void set_root(::std::string&& value); + #endif void set_root(const char* value); void set_root(const char* value, size_t size); ::std::string* mutable_root(); @@ -501,6 +522,14 @@ inline void Api::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Api.name) } +#if LANG_CXX11 +inline void Api::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Api.name) +} +#endif inline void Api::set_name(const char* value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -605,6 +634,14 @@ inline void Api::set_version(const ::std::string& value) { version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Api.version) } +#if LANG_CXX11 +inline void Api::set_version(::std::string&& value) { + + version_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Api.version) +} +#endif inline void Api::set_version(const char* value) { version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -736,6 +773,14 @@ inline void Method::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Method.name) } +#if LANG_CXX11 +inline void Method::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.name) +} +#endif inline void Method::set_name(const char* value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -780,6 +825,14 @@ inline void Method::set_request_type_url(const ::std::string& value) { request_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Method.request_type_url) } +#if LANG_CXX11 +inline void Method::set_request_type_url(::std::string&& value) { + + request_type_url_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.request_type_url) +} +#endif inline void Method::set_request_type_url(const char* value) { request_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -838,6 +891,14 @@ inline void Method::set_response_type_url(const ::std::string& value) { response_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Method.response_type_url) } +#if LANG_CXX11 +inline void Method::set_response_type_url(::std::string&& value) { + + response_type_url_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.response_type_url) +} +#endif inline void Method::set_response_type_url(const char* value) { response_type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -944,6 +1005,14 @@ inline void Mixin::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Mixin.name) } +#if LANG_CXX11 +inline void Mixin::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Mixin.name) +} +#endif inline void Mixin::set_name(const char* value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -988,6 +1057,14 @@ inline void Mixin::set_root(const ::std::string& value) { root_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.Mixin.root) } +#if LANG_CXX11 +inline void Mixin::set_root(::std::string&& value) { + + root_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Mixin.root) +} +#endif inline void Mixin::set_root(const char* value) { root_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); diff --git a/src/google/protobuf/arenastring.h b/src/google/protobuf/arenastring.h index b60ee379..bc427ba2 100755 --- a/src/google/protobuf/arenastring.h +++ b/src/google/protobuf/arenastring.h @@ -210,6 +210,16 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr { } } +#if LANG_CXX11 + void SetNoArena(const ::std::string* default_value, ::std::string&& value) { + if (IsDefault(default_value)) { + ptr_ = new ::std::string(std::move(value)); + } else { + *ptr_ = std::move(value); + } + } +#endif + void AssignWithDefault(const ::std::string* default_value, ArenaStringPtr value); inline const ::std::string& GetNoArena() const { return *ptr_; } diff --git a/src/google/protobuf/compiler/cpp/cpp_string_field.cc b/src/google/protobuf/compiler/cpp/cpp_string_field.cc index a9505e3d..2874de7d 100644 --- a/src/google/protobuf/compiler/cpp/cpp_string_field.cc +++ b/src/google/protobuf/compiler/cpp/cpp_string_field.cc @@ -141,7 +141,16 @@ GenerateAccessorDeclarations(io::Printer* printer) const { printer->Print(variables_, "$deprecated_attr$const ::std::string& $name$() const;\n" - "$deprecated_attr$void set_$name$(const ::std::string& value);\n" + "$deprecated_attr$void set_$name$(const ::std::string& value);\n"); + + if (!SupportsArenas(descriptor_)) { + printer->Print(variables_, + "#if LANG_CXX11\n" + "$deprecated_attr$void set_$name$(::std::string&& value);\n" + "#endif\n"); + } + + printer->Print(variables_, "$deprecated_attr$void set_$name$(const char* value);\n" "$deprecated_attr$void set_$name$(const $pointer_type$* value, size_t size)" ";\n" @@ -249,6 +258,14 @@ GenerateInlineAccessorDefinitions(io::Printer* printer, " $name$_.SetNoArena($default_variable$, value);\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n" + "#if LANG_CXX11\n" + "$inline$void $classname$::set_$name$(::std::string&& value) {\n" + " $set_hasbit$\n" + " $name$_.SetNoArena(\n" + " $default_variable$, ::std::move(value));\n" + " // @@protoc_insertion_point(field_set_rvalue:$full_name$)\n" + "}\n" + "#endif\n" "$inline$void $classname$::set_$name$(const char* value) {\n" " $set_hasbit$\n" " $name$_.SetNoArena($default_variable$, $string_piece$(value));\n" @@ -633,6 +650,19 @@ GenerateInlineAccessorDefinitions(io::Printer* printer, " $oneof_prefix$$name$_.SetNoArena($default_variable$, value);\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n" + "#if LANG_CXX11\n" + "$inline$void $classname$::set_$name$(::std::string&& value) {\n" + " // @@protoc_insertion_point(field_set:$full_name$)\n" + " if (!has_$name$()) {\n" + " clear_$oneof_name$();\n" + " set_has_$name$();\n" + " $oneof_prefix$$name$_.UnsafeSetDefault($default_variable$);\n" + " }\n" + " $oneof_prefix$$name$_.SetNoArena(\n" + " $default_variable$, ::std::move(value));\n" + " // @@protoc_insertion_point(field_set_rvalue:$full_name$)\n" + "}\n" + "#endif\n" "$inline$void $classname$::set_$name$(const char* value) {\n" " if (!has_$name$()) {\n" " clear_$oneof_name$();\n" diff --git a/src/google/protobuf/compiler/cpp/cpp_unittest.cc b/src/google/protobuf/compiler/cpp/cpp_unittest.cc index 8eaddb87..686c70a9 100644 --- a/src/google/protobuf/compiler/cpp/cpp_unittest.cc +++ b/src/google/protobuf/compiler/cpp/cpp_unittest.cc @@ -53,6 +53,7 @@ #include #include +#include #include #include #if !defined(GOOGLE_PROTOBUF_CMAKE_BUILD) && !defined(_MSC_VER) @@ -420,6 +421,51 @@ TEST(GeneratedMessageTest, StringCharStarLength) { EXPECT_EQ("wx", message.repeated_string(0)); } +#if LANG_CXX11 +TEST(GeneratedMessageTest, StringMove) { + // Verify that we trigger the move behavior on a scalar setter. + protobuf_unittest_no_arena::TestAllTypes message; + { + string tmp(32, 'a'); + + const char* old_data = tmp.data(); + message.set_optional_string(std::move(tmp)); + const char* new_data = message.optional_string().data(); + + EXPECT_EQ(old_data, new_data); + EXPECT_EQ(string(32, 'a'), message.optional_string()); + + string tmp2(32, 'b'); + old_data = tmp2.data(); + message.set_optional_string(std::move(tmp2)); + new_data = message.optional_string().data(); + + EXPECT_EQ(old_data, new_data); + EXPECT_EQ(string(32, 'b'), message.optional_string()); + } + + // Verify that we trigger the move behavior on a oneof setter. + { + string tmp(32, 'a'); + + const char* old_data = tmp.data(); + message.set_oneof_string(std::move(tmp)); + const char* new_data = message.oneof_string().data(); + + EXPECT_EQ(old_data, new_data); + EXPECT_EQ(string(32, 'a'), message.oneof_string()); + + string tmp2(32, 'b'); + old_data = tmp2.data(); + message.set_oneof_string(std::move(tmp2)); + new_data = message.oneof_string().data(); + + EXPECT_EQ(old_data, new_data); + EXPECT_EQ(string(32, 'b'), message.oneof_string()); + } +} +#endif + TEST(GeneratedMessageTest, CopyFrom) { unittest::TestAllTypes message1, message2; diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index bb78eff6..6edb5e76 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -651,6 +651,14 @@ void Version::set_suffix(const ::std::string& value) { suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.suffix) } +#if LANG_CXX11 +void Version::set_suffix(::std::string&& value) { + set_has_suffix(); + suffix_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.Version.suffix) +} +#endif void Version::set_suffix(const char* value) { set_has_suffix(); suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -1158,6 +1166,14 @@ void CodeGeneratorRequest::set_parameter(const ::std::string& value) { parameter_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.parameter) } +#if LANG_CXX11 +void CodeGeneratorRequest::set_parameter(::std::string&& value) { + set_has_parameter(); + parameter_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorRequest.parameter) +} +#endif void CodeGeneratorRequest::set_parameter(const char* value) { set_has_parameter(); parameter_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -1662,6 +1678,14 @@ void CodeGeneratorResponse_File::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.name) } +#if LANG_CXX11 +void CodeGeneratorResponse_File::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.name) +} +#endif void CodeGeneratorResponse_File::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -1716,6 +1740,14 @@ void CodeGeneratorResponse_File::set_insertion_point(const ::std::string& value) insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) } +#if LANG_CXX11 +void CodeGeneratorResponse_File::set_insertion_point(::std::string&& value) { + set_has_insertion_point(); + insertion_point_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) +} +#endif void CodeGeneratorResponse_File::set_insertion_point(const char* value) { set_has_insertion_point(); insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -1770,6 +1802,14 @@ void CodeGeneratorResponse_File::set_content(const ::std::string& value) { content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.content) } +#if LANG_CXX11 +void CodeGeneratorResponse_File::set_content(::std::string&& value) { + set_has_content(); + content_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.content) +} +#endif void CodeGeneratorResponse_File::set_content(const char* value) { set_has_content(); content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -2117,6 +2157,14 @@ void CodeGeneratorResponse::set_error(const ::std::string& value) { error_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.error) } +#if LANG_CXX11 +void CodeGeneratorResponse::set_error(::std::string&& value) { + set_has_error(); + error_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.error) +} +#endif void CodeGeneratorResponse::set_error(const char* value) { set_has_error(); error_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h index 0948ab2d..0c29b959 100644 --- a/src/google/protobuf/compiler/plugin.pb.h +++ b/src/google/protobuf/compiler/plugin.pb.h @@ -234,6 +234,9 @@ class LIBPROTOC_EXPORT Version : public ::google::protobuf::Message /* @@protoc_ static const int kSuffixFieldNumber = 4; const ::std::string& suffix() const; void set_suffix(const ::std::string& value); + #if LANG_CXX11 + void set_suffix(::std::string&& value); + #endif void set_suffix(const char* value); void set_suffix(const char* value, size_t size); ::std::string* mutable_suffix(); @@ -362,6 +365,9 @@ class LIBPROTOC_EXPORT CodeGeneratorRequest : public ::google::protobuf::Message static const int kParameterFieldNumber = 2; const ::std::string& parameter() const; void set_parameter(const ::std::string& value); + #if LANG_CXX11 + void set_parameter(::std::string&& value); + #endif void set_parameter(const char* value); void set_parameter(const char* value, size_t size); ::std::string* mutable_parameter(); @@ -491,6 +497,9 @@ class LIBPROTOC_EXPORT CodeGeneratorResponse_File : public ::google::protobuf::M static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); @@ -503,6 +512,9 @@ class LIBPROTOC_EXPORT CodeGeneratorResponse_File : public ::google::protobuf::M static const int kInsertionPointFieldNumber = 2; const ::std::string& insertion_point() const; void set_insertion_point(const ::std::string& value); + #if LANG_CXX11 + void set_insertion_point(::std::string&& value); + #endif void set_insertion_point(const char* value); void set_insertion_point(const char* value, size_t size); ::std::string* mutable_insertion_point(); @@ -515,6 +527,9 @@ class LIBPROTOC_EXPORT CodeGeneratorResponse_File : public ::google::protobuf::M static const int kContentFieldNumber = 15; const ::std::string& content() const; void set_content(const ::std::string& value); + #if LANG_CXX11 + void set_content(::std::string&& value); + #endif void set_content(const char* value); void set_content(const char* value, size_t size); ::std::string* mutable_content(); @@ -626,6 +641,9 @@ class LIBPROTOC_EXPORT CodeGeneratorResponse : public ::google::protobuf::Messag static const int kErrorFieldNumber = 1; const ::std::string& error() const; void set_error(const ::std::string& value); + #if LANG_CXX11 + void set_error(::std::string&& value); + #endif void set_error(const char* value); void set_error(const char* value, size_t size); ::std::string* mutable_error(); @@ -763,6 +781,14 @@ inline void Version::set_suffix(const ::std::string& value) { suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.suffix) } +#if LANG_CXX11 +inline void Version::set_suffix(::std::string&& value) { + set_has_suffix(); + suffix_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.Version.suffix) +} +#endif inline void Version::set_suffix(const char* value) { set_has_suffix(); suffix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -876,6 +902,14 @@ inline void CodeGeneratorRequest::set_parameter(const ::std::string& value) { parameter_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.parameter) } +#if LANG_CXX11 +inline void CodeGeneratorRequest::set_parameter(::std::string&& value) { + set_has_parameter(); + parameter_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorRequest.parameter) +} +#endif inline void CodeGeneratorRequest::set_parameter(const char* value) { set_has_parameter(); parameter_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -1009,6 +1043,14 @@ inline void CodeGeneratorResponse_File::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.name) } +#if LANG_CXX11 +inline void CodeGeneratorResponse_File::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.name) +} +#endif inline void CodeGeneratorResponse_File::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -1063,6 +1105,14 @@ inline void CodeGeneratorResponse_File::set_insertion_point(const ::std::string& insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) } +#if LANG_CXX11 +inline void CodeGeneratorResponse_File::set_insertion_point(::std::string&& value) { + set_has_insertion_point(); + insertion_point_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point) +} +#endif inline void CodeGeneratorResponse_File::set_insertion_point(const char* value) { set_has_insertion_point(); insertion_point_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -1117,6 +1167,14 @@ inline void CodeGeneratorResponse_File::set_content(const ::std::string& value) content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.content) } +#if LANG_CXX11 +inline void CodeGeneratorResponse_File::set_content(::std::string&& value) { + set_has_content(); + content_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.content) +} +#endif inline void CodeGeneratorResponse_File::set_content(const char* value) { set_has_content(); content_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -1175,6 +1233,14 @@ inline void CodeGeneratorResponse::set_error(const ::std::string& value) { error_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.error) } +#if LANG_CXX11 +inline void CodeGeneratorResponse::set_error(::std::string&& value) { + set_has_error(); + error_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.error) +} +#endif inline void CodeGeneratorResponse::set_error(const char* value) { set_has_error(); error_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 7c72a5a1..bb445444 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -2001,6 +2001,14 @@ void FileDescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.name) } +#if LANG_CXX11 +void FileDescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileDescriptorProto.name) +} +#endif void FileDescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -2055,6 +2063,14 @@ void FileDescriptorProto::set_package(const ::std::string& value) { package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.package) } +#if LANG_CXX11 +void FileDescriptorProto::set_package(::std::string&& value) { + set_has_package(); + package_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileDescriptorProto.package) +} +#endif void FileDescriptorProto::set_package(const char* value) { set_has_package(); package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -2434,6 +2450,14 @@ void FileDescriptorProto::set_syntax(const ::std::string& value) { syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.syntax) } +#if LANG_CXX11 +void FileDescriptorProto::set_syntax(::std::string&& value) { + set_has_syntax(); + syntax_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileDescriptorProto.syntax) +} +#endif void FileDescriptorProto::set_syntax(const char* value) { set_has_syntax(); syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -3791,6 +3815,14 @@ void DescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.name) } +#if LANG_CXX11 +void DescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.DescriptorProto.name) +} +#endif void DescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -4870,6 +4902,14 @@ void FieldDescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.name) } +#if LANG_CXX11 +void FieldDescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.name) +} +#endif void FieldDescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -4998,6 +5038,14 @@ void FieldDescriptorProto::set_type_name(const ::std::string& value) { type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type_name) } +#if LANG_CXX11 +void FieldDescriptorProto::set_type_name(::std::string&& value) { + set_has_type_name(); + type_name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.type_name) +} +#endif void FieldDescriptorProto::set_type_name(const char* value) { set_has_type_name(); type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -5052,6 +5100,14 @@ void FieldDescriptorProto::set_extendee(const ::std::string& value) { extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.extendee) } +#if LANG_CXX11 +void FieldDescriptorProto::set_extendee(::std::string&& value) { + set_has_extendee(); + extendee_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.extendee) +} +#endif void FieldDescriptorProto::set_extendee(const char* value) { set_has_extendee(); extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -5106,6 +5162,14 @@ void FieldDescriptorProto::set_default_value(const ::std::string& value) { default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.default_value) } +#if LANG_CXX11 +void FieldDescriptorProto::set_default_value(::std::string&& value) { + set_has_default_value(); + default_value_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.default_value) +} +#endif void FieldDescriptorProto::set_default_value(const char* value) { set_has_default_value(); default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -5184,6 +5248,14 @@ void FieldDescriptorProto::set_json_name(const ::std::string& value) { json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.json_name) } +#if LANG_CXX11 +void FieldDescriptorProto::set_json_name(::std::string&& value) { + set_has_json_name(); + json_name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.json_name) +} +#endif void FieldDescriptorProto::set_json_name(const char* value) { set_has_json_name(); json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -5592,6 +5664,14 @@ void OneofDescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.OneofDescriptorProto.name) } +#if LANG_CXX11 +void OneofDescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.OneofDescriptorProto.name) +} +#endif void OneofDescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -6043,6 +6123,14 @@ void EnumDescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.name) } +#if LANG_CXX11 +void EnumDescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.EnumDescriptorProto.name) +} +#endif void EnumDescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -6519,6 +6607,14 @@ void EnumValueDescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.name) } +#if LANG_CXX11 +void EnumValueDescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.EnumValueDescriptorProto.name) +} +#endif void EnumValueDescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -6994,6 +7090,14 @@ void ServiceDescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.ServiceDescriptorProto.name) } +#if LANG_CXX11 +void ServiceDescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.ServiceDescriptorProto.name) +} +#endif void ServiceDescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -7624,6 +7728,14 @@ void MethodDescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.name) } +#if LANG_CXX11 +void MethodDescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.MethodDescriptorProto.name) +} +#endif void MethodDescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -7678,6 +7790,14 @@ void MethodDescriptorProto::set_input_type(const ::std::string& value) { input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.input_type) } +#if LANG_CXX11 +void MethodDescriptorProto::set_input_type(::std::string&& value) { + set_has_input_type(); + input_type_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.MethodDescriptorProto.input_type) +} +#endif void MethodDescriptorProto::set_input_type(const char* value) { set_has_input_type(); input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -7732,6 +7852,14 @@ void MethodDescriptorProto::set_output_type(const ::std::string& value) { output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.output_type) } +#if LANG_CXX11 +void MethodDescriptorProto::set_output_type(::std::string&& value) { + set_has_output_type(); + output_type_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.MethodDescriptorProto.output_type) +} +#endif void MethodDescriptorProto::set_output_type(const char* value) { set_has_output_type(); output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -8821,6 +8949,14 @@ void FileOptions::set_java_package(const ::std::string& value) { java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_package) } +#if LANG_CXX11 +void FileOptions::set_java_package(::std::string&& value) { + set_has_java_package(); + java_package_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.java_package) +} +#endif void FileOptions::set_java_package(const char* value) { set_has_java_package(); java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -8875,6 +9011,14 @@ void FileOptions::set_java_outer_classname(const ::std::string& value) { java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_outer_classname) } +#if LANG_CXX11 +void FileOptions::set_java_outer_classname(::std::string&& value) { + set_has_java_outer_classname(); + java_outer_classname_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.java_outer_classname) +} +#endif void FileOptions::set_java_outer_classname(const char* value) { set_has_java_outer_classname(); java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -9026,6 +9170,14 @@ void FileOptions::set_go_package(const ::std::string& value) { go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.go_package) } +#if LANG_CXX11 +void FileOptions::set_go_package(::std::string&& value) { + set_has_go_package(); + go_package_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.go_package) +} +#endif void FileOptions::set_go_package(const char* value) { set_has_go_package(); go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -9200,6 +9352,14 @@ void FileOptions::set_objc_class_prefix(const ::std::string& value) { objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.objc_class_prefix) } +#if LANG_CXX11 +void FileOptions::set_objc_class_prefix(::std::string&& value) { + set_has_objc_class_prefix(); + objc_class_prefix_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.objc_class_prefix) +} +#endif void FileOptions::set_objc_class_prefix(const char* value) { set_has_objc_class_prefix(); objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -9254,6 +9414,14 @@ void FileOptions::set_csharp_namespace(const ::std::string& value) { csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.csharp_namespace) } +#if LANG_CXX11 +void FileOptions::set_csharp_namespace(::std::string&& value) { + set_has_csharp_namespace(); + csharp_namespace_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.csharp_namespace) +} +#endif void FileOptions::set_csharp_namespace(const char* value) { set_has_csharp_namespace(); csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -9308,6 +9476,14 @@ void FileOptions::set_swift_prefix(const ::std::string& value) { swift_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.swift_prefix) } +#if LANG_CXX11 +void FileOptions::set_swift_prefix(::std::string&& value) { + set_has_swift_prefix(); + swift_prefix_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.swift_prefix) +} +#endif void FileOptions::set_swift_prefix(const char* value) { set_has_swift_prefix(); swift_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -12713,6 +12889,14 @@ void UninterpretedOption_NamePart::set_name_part(const ::std::string& value) { name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.name_part) } +#if LANG_CXX11 +void UninterpretedOption_NamePart::set_name_part(::std::string&& value) { + set_has_name_part(); + name_part_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.NamePart.name_part) +} +#endif void UninterpretedOption_NamePart::set_name_part(const char* value) { set_has_name_part(); name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -13339,6 +13523,14 @@ void UninterpretedOption::set_identifier_value(const ::std::string& value) { identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.identifier_value) } +#if LANG_CXX11 +void UninterpretedOption::set_identifier_value(::std::string&& value) { + set_has_identifier_value(); + identifier_value_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.identifier_value) +} +#endif void UninterpretedOption::set_identifier_value(const char* value) { set_has_identifier_value(); identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -13465,6 +13657,14 @@ void UninterpretedOption::set_string_value(const ::std::string& value) { string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.string_value) } +#if LANG_CXX11 +void UninterpretedOption::set_string_value(::std::string&& value) { + set_has_string_value(); + string_value_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.string_value) +} +#endif void UninterpretedOption::set_string_value(const char* value) { set_has_string_value(); string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -13519,6 +13719,14 @@ void UninterpretedOption::set_aggregate_value(const ::std::string& value) { aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.aggregate_value) } +#if LANG_CXX11 +void UninterpretedOption::set_aggregate_value(::std::string&& value) { + set_has_aggregate_value(); + aggregate_value_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.aggregate_value) +} +#endif void UninterpretedOption::set_aggregate_value(const char* value) { set_has_aggregate_value(); aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -14126,6 +14334,14 @@ void SourceCodeInfo_Location::set_leading_comments(const ::std::string& value) { leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_comments) } +#if LANG_CXX11 +void SourceCodeInfo_Location::set_leading_comments(::std::string&& value) { + set_has_leading_comments(); + leading_comments_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceCodeInfo.Location.leading_comments) +} +#endif void SourceCodeInfo_Location::set_leading_comments(const char* value) { set_has_leading_comments(); leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -14180,6 +14396,14 @@ void SourceCodeInfo_Location::set_trailing_comments(const ::std::string& value) trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.trailing_comments) } +#if LANG_CXX11 +void SourceCodeInfo_Location::set_trailing_comments(::std::string&& value) { + set_has_trailing_comments(); + trailing_comments_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceCodeInfo.Location.trailing_comments) +} +#endif void SourceCodeInfo_Location::set_trailing_comments(const char* value) { set_has_trailing_comments(); trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -14981,6 +15205,14 @@ void GeneratedCodeInfo_Annotation::set_source_file(const ::std::string& value) { source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.source_file) } +#if LANG_CXX11 +void GeneratedCodeInfo_Annotation::set_source_file(::std::string&& value) { + set_has_source_file(); + source_file_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.GeneratedCodeInfo.Annotation.source_file) +} +#endif void GeneratedCodeInfo_Annotation::set_source_file(const char* value) { set_has_source_file(); source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index 8459b138..262ca324 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -434,6 +434,9 @@ class LIBPROTOBUF_EXPORT FileDescriptorProto : public ::google::protobuf::Messag static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); @@ -446,6 +449,9 @@ class LIBPROTOBUF_EXPORT FileDescriptorProto : public ::google::protobuf::Messag static const int kPackageFieldNumber = 2; const ::std::string& package() const; void set_package(const ::std::string& value); + #if LANG_CXX11 + void set_package(::std::string&& value); + #endif void set_package(const char* value); void set_package(const char* value, size_t size); ::std::string* mutable_package(); @@ -564,6 +570,9 @@ class LIBPROTOBUF_EXPORT FileDescriptorProto : public ::google::protobuf::Messag static const int kSyntaxFieldNumber = 12; const ::std::string& syntax() const; void set_syntax(const ::std::string& value); + #if LANG_CXX11 + void set_syntax(::std::string&& value); + #endif void set_syntax(const char* value); void set_syntax(const char* value, size_t size); ::std::string* mutable_syntax(); @@ -905,6 +914,9 @@ class LIBPROTOBUF_EXPORT DescriptorProto : public ::google::protobuf::Message /* static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); @@ -1214,6 +1226,9 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); @@ -1247,6 +1262,9 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa static const int kTypeNameFieldNumber = 6; const ::std::string& type_name() const; void set_type_name(const ::std::string& value); + #if LANG_CXX11 + void set_type_name(::std::string&& value); + #endif void set_type_name(const char* value); void set_type_name(const char* value, size_t size); ::std::string* mutable_type_name(); @@ -1259,6 +1277,9 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa static const int kExtendeeFieldNumber = 2; const ::std::string& extendee() const; void set_extendee(const ::std::string& value); + #if LANG_CXX11 + void set_extendee(::std::string&& value); + #endif void set_extendee(const char* value); void set_extendee(const char* value, size_t size); ::std::string* mutable_extendee(); @@ -1271,6 +1292,9 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa static const int kDefaultValueFieldNumber = 7; const ::std::string& default_value() const; void set_default_value(const ::std::string& value); + #if LANG_CXX11 + void set_default_value(::std::string&& value); + #endif void set_default_value(const char* value); void set_default_value(const char* value, size_t size); ::std::string* mutable_default_value(); @@ -1290,6 +1314,9 @@ class LIBPROTOBUF_EXPORT FieldDescriptorProto : public ::google::protobuf::Messa static const int kJsonNameFieldNumber = 10; const ::std::string& json_name() const; void set_json_name(const ::std::string& value); + #if LANG_CXX11 + void set_json_name(::std::string&& value); + #endif void set_json_name(const char* value); void set_json_name(const char* value, size_t size); ::std::string* mutable_json_name(); @@ -1429,6 +1456,9 @@ class LIBPROTOBUF_EXPORT OneofDescriptorProto : public ::google::protobuf::Messa static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); @@ -1544,6 +1574,9 @@ class LIBPROTOBUF_EXPORT EnumDescriptorProto : public ::google::protobuf::Messag static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); @@ -1672,6 +1705,9 @@ class LIBPROTOBUF_EXPORT EnumValueDescriptorProto : public ::google::protobuf::M static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); @@ -1797,6 +1833,9 @@ class LIBPROTOBUF_EXPORT ServiceDescriptorProto : public ::google::protobuf::Mes static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); @@ -1925,6 +1964,9 @@ class LIBPROTOBUF_EXPORT MethodDescriptorProto : public ::google::protobuf::Mess static const int kNameFieldNumber = 1; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); @@ -1937,6 +1979,9 @@ class LIBPROTOBUF_EXPORT MethodDescriptorProto : public ::google::protobuf::Mess static const int kInputTypeFieldNumber = 2; const ::std::string& input_type() const; void set_input_type(const ::std::string& value); + #if LANG_CXX11 + void set_input_type(::std::string&& value); + #endif void set_input_type(const char* value); void set_input_type(const char* value, size_t size); ::std::string* mutable_input_type(); @@ -1949,6 +1994,9 @@ class LIBPROTOBUF_EXPORT MethodDescriptorProto : public ::google::protobuf::Mess static const int kOutputTypeFieldNumber = 3; const ::std::string& output_type() const; void set_output_type(const ::std::string& value); + #if LANG_CXX11 + void set_output_type(::std::string&& value); + #endif void set_output_type(const char* value); void set_output_type(const char* value, size_t size); ::std::string* mutable_output_type(); @@ -2118,6 +2166,9 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message /* @@p static const int kJavaPackageFieldNumber = 1; const ::std::string& java_package() const; void set_java_package(const ::std::string& value); + #if LANG_CXX11 + void set_java_package(::std::string&& value); + #endif void set_java_package(const char* value); void set_java_package(const char* value, size_t size); ::std::string* mutable_java_package(); @@ -2130,6 +2181,9 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message /* @@p static const int kJavaOuterClassnameFieldNumber = 8; const ::std::string& java_outer_classname() const; void set_java_outer_classname(const ::std::string& value); + #if LANG_CXX11 + void set_java_outer_classname(::std::string&& value); + #endif void set_java_outer_classname(const char* value); void set_java_outer_classname(const char* value, size_t size); ::std::string* mutable_java_outer_classname(); @@ -2170,6 +2224,9 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message /* @@p static const int kGoPackageFieldNumber = 11; const ::std::string& go_package() const; void set_go_package(const ::std::string& value); + #if LANG_CXX11 + void set_go_package(::std::string&& value); + #endif void set_go_package(const char* value); void set_go_package(const char* value, size_t size); ::std::string* mutable_go_package(); @@ -2217,6 +2274,9 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message /* @@p static const int kObjcClassPrefixFieldNumber = 36; const ::std::string& objc_class_prefix() const; void set_objc_class_prefix(const ::std::string& value); + #if LANG_CXX11 + void set_objc_class_prefix(::std::string&& value); + #endif void set_objc_class_prefix(const char* value); void set_objc_class_prefix(const char* value, size_t size); ::std::string* mutable_objc_class_prefix(); @@ -2229,6 +2289,9 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message /* @@p static const int kCsharpNamespaceFieldNumber = 37; const ::std::string& csharp_namespace() const; void set_csharp_namespace(const ::std::string& value); + #if LANG_CXX11 + void set_csharp_namespace(::std::string&& value); + #endif void set_csharp_namespace(const char* value); void set_csharp_namespace(const char* value, size_t size); ::std::string* mutable_csharp_namespace(); @@ -2241,6 +2304,9 @@ class LIBPROTOBUF_EXPORT FileOptions : public ::google::protobuf::Message /* @@p static const int kSwiftPrefixFieldNumber = 39; const ::std::string& swift_prefix() const; void set_swift_prefix(const ::std::string& value); + #if LANG_CXX11 + void set_swift_prefix(::std::string&& value); + #endif void set_swift_prefix(const char* value); void set_swift_prefix(const char* value, size_t size); ::std::string* mutable_swift_prefix(); @@ -3374,6 +3440,9 @@ class LIBPROTOBUF_EXPORT UninterpretedOption_NamePart : public ::google::protobu static const int kNamePartFieldNumber = 1; const ::std::string& name_part() const; void set_name_part(const ::std::string& value); + #if LANG_CXX11 + void set_name_part(::std::string&& value); + #endif void set_name_part(const char* value); void set_name_part(const char* value, size_t size); ::std::string* mutable_name_part(); @@ -3504,6 +3573,9 @@ class LIBPROTOBUF_EXPORT UninterpretedOption : public ::google::protobuf::Messag static const int kIdentifierValueFieldNumber = 3; const ::std::string& identifier_value() const; void set_identifier_value(const ::std::string& value); + #if LANG_CXX11 + void set_identifier_value(::std::string&& value); + #endif void set_identifier_value(const char* value); void set_identifier_value(const char* value, size_t size); ::std::string* mutable_identifier_value(); @@ -3537,6 +3609,9 @@ class LIBPROTOBUF_EXPORT UninterpretedOption : public ::google::protobuf::Messag static const int kStringValueFieldNumber = 7; const ::std::string& string_value() const; void set_string_value(const ::std::string& value); + #if LANG_CXX11 + void set_string_value(::std::string&& value); + #endif void set_string_value(const char* value); void set_string_value(const void* value, size_t size); ::std::string* mutable_string_value(); @@ -3549,6 +3624,9 @@ class LIBPROTOBUF_EXPORT UninterpretedOption : public ::google::protobuf::Messag static const int kAggregateValueFieldNumber = 8; const ::std::string& aggregate_value() const; void set_aggregate_value(const ::std::string& value); + #if LANG_CXX11 + void set_aggregate_value(::std::string&& value); + #endif void set_aggregate_value(const char* value); void set_aggregate_value(const char* value, size_t size); ::std::string* mutable_aggregate_value(); @@ -3692,6 +3770,9 @@ class LIBPROTOBUF_EXPORT SourceCodeInfo_Location : public ::google::protobuf::Me static const int kLeadingCommentsFieldNumber = 3; const ::std::string& leading_comments() const; void set_leading_comments(const ::std::string& value); + #if LANG_CXX11 + void set_leading_comments(::std::string&& value); + #endif void set_leading_comments(const char* value); void set_leading_comments(const char* value, size_t size); ::std::string* mutable_leading_comments(); @@ -3704,6 +3785,9 @@ class LIBPROTOBUF_EXPORT SourceCodeInfo_Location : public ::google::protobuf::Me static const int kTrailingCommentsFieldNumber = 4; const ::std::string& trailing_comments() const; void set_trailing_comments(const ::std::string& value); + #if LANG_CXX11 + void set_trailing_comments(::std::string&& value); + #endif void set_trailing_comments(const char* value); void set_trailing_comments(const char* value, size_t size); ::std::string* mutable_trailing_comments(); @@ -3946,6 +4030,9 @@ class LIBPROTOBUF_EXPORT GeneratedCodeInfo_Annotation : public ::google::protobu static const int kSourceFileFieldNumber = 2; const ::std::string& source_file() const; void set_source_file(const ::std::string& value); + #if LANG_CXX11 + void set_source_file(::std::string&& value); + #endif void set_source_file(const char* value); void set_source_file(const char* value, size_t size); ::std::string* mutable_source_file(); @@ -4157,6 +4244,14 @@ inline void FileDescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.name) } +#if LANG_CXX11 +inline void FileDescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileDescriptorProto.name) +} +#endif inline void FileDescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -4211,6 +4306,14 @@ inline void FileDescriptorProto::set_package(const ::std::string& value) { package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.package) } +#if LANG_CXX11 +inline void FileDescriptorProto::set_package(::std::string&& value) { + set_has_package(); + package_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileDescriptorProto.package) +} +#endif inline void FileDescriptorProto::set_package(const char* value) { set_has_package(); package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -4590,6 +4693,14 @@ inline void FileDescriptorProto::set_syntax(const ::std::string& value) { syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileDescriptorProto.syntax) } +#if LANG_CXX11 +inline void FileDescriptorProto::set_syntax(::std::string&& value) { + set_has_syntax(); + syntax_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileDescriptorProto.syntax) +} +#endif inline void FileDescriptorProto::set_syntax(const char* value) { set_has_syntax(); syntax_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -4752,6 +4863,14 @@ inline void DescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.DescriptorProto.name) } +#if LANG_CXX11 +inline void DescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.DescriptorProto.name) +} +#endif inline void DescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -5120,6 +5239,14 @@ inline void FieldDescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.name) } +#if LANG_CXX11 +inline void FieldDescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.name) +} +#endif inline void FieldDescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -5248,6 +5375,14 @@ inline void FieldDescriptorProto::set_type_name(const ::std::string& value) { type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.type_name) } +#if LANG_CXX11 +inline void FieldDescriptorProto::set_type_name(::std::string&& value) { + set_has_type_name(); + type_name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.type_name) +} +#endif inline void FieldDescriptorProto::set_type_name(const char* value) { set_has_type_name(); type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -5302,6 +5437,14 @@ inline void FieldDescriptorProto::set_extendee(const ::std::string& value) { extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.extendee) } +#if LANG_CXX11 +inline void FieldDescriptorProto::set_extendee(::std::string&& value) { + set_has_extendee(); + extendee_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.extendee) +} +#endif inline void FieldDescriptorProto::set_extendee(const char* value) { set_has_extendee(); extendee_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -5356,6 +5499,14 @@ inline void FieldDescriptorProto::set_default_value(const ::std::string& value) default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.default_value) } +#if LANG_CXX11 +inline void FieldDescriptorProto::set_default_value(::std::string&& value) { + set_has_default_value(); + default_value_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.default_value) +} +#endif inline void FieldDescriptorProto::set_default_value(const char* value) { set_has_default_value(); default_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -5434,6 +5585,14 @@ inline void FieldDescriptorProto::set_json_name(const ::std::string& value) { json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FieldDescriptorProto.json_name) } +#if LANG_CXX11 +inline void FieldDescriptorProto::set_json_name(::std::string&& value) { + set_has_json_name(); + json_name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FieldDescriptorProto.json_name) +} +#endif inline void FieldDescriptorProto::set_json_name(const char* value) { set_has_json_name(); json_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -5537,6 +5696,14 @@ inline void OneofDescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.OneofDescriptorProto.name) } +#if LANG_CXX11 +inline void OneofDescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.OneofDescriptorProto.name) +} +#endif inline void OneofDescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -5640,6 +5807,14 @@ inline void EnumDescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.EnumDescriptorProto.name) } +#if LANG_CXX11 +inline void EnumDescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.EnumDescriptorProto.name) +} +#endif inline void EnumDescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -5773,6 +5948,14 @@ inline void EnumValueDescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.EnumValueDescriptorProto.name) } +#if LANG_CXX11 +inline void EnumValueDescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.EnumValueDescriptorProto.name) +} +#endif inline void EnumValueDescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -5900,6 +6083,14 @@ inline void ServiceDescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.ServiceDescriptorProto.name) } +#if LANG_CXX11 +inline void ServiceDescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.ServiceDescriptorProto.name) +} +#endif inline void ServiceDescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -6033,6 +6224,14 @@ inline void MethodDescriptorProto::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.name) } +#if LANG_CXX11 +inline void MethodDescriptorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.MethodDescriptorProto.name) +} +#endif inline void MethodDescriptorProto::set_name(const char* value) { set_has_name(); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -6087,6 +6286,14 @@ inline void MethodDescriptorProto::set_input_type(const ::std::string& value) { input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.input_type) } +#if LANG_CXX11 +inline void MethodDescriptorProto::set_input_type(::std::string&& value) { + set_has_input_type(); + input_type_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.MethodDescriptorProto.input_type) +} +#endif inline void MethodDescriptorProto::set_input_type(const char* value) { set_has_input_type(); input_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -6141,6 +6348,14 @@ inline void MethodDescriptorProto::set_output_type(const ::std::string& value) { output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.MethodDescriptorProto.output_type) } +#if LANG_CXX11 +inline void MethodDescriptorProto::set_output_type(::std::string&& value) { + set_has_output_type(); + output_type_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.MethodDescriptorProto.output_type) +} +#endif inline void MethodDescriptorProto::set_output_type(const char* value) { set_has_output_type(); output_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -6292,6 +6507,14 @@ inline void FileOptions::set_java_package(const ::std::string& value) { java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_package) } +#if LANG_CXX11 +inline void FileOptions::set_java_package(::std::string&& value) { + set_has_java_package(); + java_package_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.java_package) +} +#endif inline void FileOptions::set_java_package(const char* value) { set_has_java_package(); java_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -6346,6 +6569,14 @@ inline void FileOptions::set_java_outer_classname(const ::std::string& value) { java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.java_outer_classname) } +#if LANG_CXX11 +inline void FileOptions::set_java_outer_classname(::std::string&& value) { + set_has_java_outer_classname(); + java_outer_classname_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.java_outer_classname) +} +#endif inline void FileOptions::set_java_outer_classname(const char* value) { set_has_java_outer_classname(); java_outer_classname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -6497,6 +6728,14 @@ inline void FileOptions::set_go_package(const ::std::string& value) { go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.go_package) } +#if LANG_CXX11 +inline void FileOptions::set_go_package(::std::string&& value) { + set_has_go_package(); + go_package_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.go_package) +} +#endif inline void FileOptions::set_go_package(const char* value) { set_has_go_package(); go_package_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -6671,6 +6910,14 @@ inline void FileOptions::set_objc_class_prefix(const ::std::string& value) { objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.objc_class_prefix) } +#if LANG_CXX11 +inline void FileOptions::set_objc_class_prefix(::std::string&& value) { + set_has_objc_class_prefix(); + objc_class_prefix_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.objc_class_prefix) +} +#endif inline void FileOptions::set_objc_class_prefix(const char* value) { set_has_objc_class_prefix(); objc_class_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -6725,6 +6972,14 @@ inline void FileOptions::set_csharp_namespace(const ::std::string& value) { csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.csharp_namespace) } +#if LANG_CXX11 +inline void FileOptions::set_csharp_namespace(::std::string&& value) { + set_has_csharp_namespace(); + csharp_namespace_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.csharp_namespace) +} +#endif inline void FileOptions::set_csharp_namespace(const char* value) { set_has_csharp_namespace(); csharp_namespace_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -6779,6 +7034,14 @@ inline void FileOptions::set_swift_prefix(const ::std::string& value) { swift_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.FileOptions.swift_prefix) } +#if LANG_CXX11 +inline void FileOptions::set_swift_prefix(::std::string&& value) { + set_has_swift_prefix(); + swift_prefix_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.FileOptions.swift_prefix) +} +#endif inline void FileOptions::set_swift_prefix(const char* value) { set_has_swift_prefix(); swift_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -7492,6 +7755,14 @@ inline void UninterpretedOption_NamePart::set_name_part(const ::std::string& val name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.NamePart.name_part) } +#if LANG_CXX11 +inline void UninterpretedOption_NamePart::set_name_part(::std::string&& value) { + set_has_name_part(); + name_part_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.NamePart.name_part) +} +#endif inline void UninterpretedOption_NamePart::set_name_part(const char* value) { set_has_name_part(); name_part_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -7604,6 +7875,14 @@ inline void UninterpretedOption::set_identifier_value(const ::std::string& value identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.identifier_value) } +#if LANG_CXX11 +inline void UninterpretedOption::set_identifier_value(::std::string&& value) { + set_has_identifier_value(); + identifier_value_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.identifier_value) +} +#endif inline void UninterpretedOption::set_identifier_value(const char* value) { set_has_identifier_value(); identifier_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -7730,6 +8009,14 @@ inline void UninterpretedOption::set_string_value(const ::std::string& value) { string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.string_value) } +#if LANG_CXX11 +inline void UninterpretedOption::set_string_value(::std::string&& value) { + set_has_string_value(); + string_value_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.string_value) +} +#endif inline void UninterpretedOption::set_string_value(const char* value) { set_has_string_value(); string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -7784,6 +8071,14 @@ inline void UninterpretedOption::set_aggregate_value(const ::std::string& value) aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.UninterpretedOption.aggregate_value) } +#if LANG_CXX11 +inline void UninterpretedOption::set_aggregate_value(::std::string&& value) { + set_has_aggregate_value(); + aggregate_value_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.UninterpretedOption.aggregate_value) +} +#endif inline void UninterpretedOption::set_aggregate_value(const char* value) { set_has_aggregate_value(); aggregate_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -7902,6 +8197,14 @@ inline void SourceCodeInfo_Location::set_leading_comments(const ::std::string& v leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.leading_comments) } +#if LANG_CXX11 +inline void SourceCodeInfo_Location::set_leading_comments(::std::string&& value) { + set_has_leading_comments(); + leading_comments_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceCodeInfo.Location.leading_comments) +} +#endif inline void SourceCodeInfo_Location::set_leading_comments(const char* value) { set_has_leading_comments(); leading_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -7956,6 +8259,14 @@ inline void SourceCodeInfo_Location::set_trailing_comments(const ::std::string& trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.SourceCodeInfo.Location.trailing_comments) } +#if LANG_CXX11 +inline void SourceCodeInfo_Location::set_trailing_comments(::std::string&& value) { + set_has_trailing_comments(); + trailing_comments_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceCodeInfo.Location.trailing_comments) +} +#endif inline void SourceCodeInfo_Location::set_trailing_comments(const char* value) { set_has_trailing_comments(); trailing_comments_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); @@ -8133,6 +8444,14 @@ inline void GeneratedCodeInfo_Annotation::set_source_file(const ::std::string& v source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.GeneratedCodeInfo.Annotation.source_file) } +#if LANG_CXX11 +inline void GeneratedCodeInfo_Annotation::set_source_file(::std::string&& value) { + set_has_source_file(); + source_file_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.GeneratedCodeInfo.Annotation.source_file) +} +#endif inline void GeneratedCodeInfo_Annotation::set_source_file(const char* value) { set_has_source_file(); source_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); diff --git a/src/google/protobuf/source_context.pb.cc b/src/google/protobuf/source_context.pb.cc index b9e5a73b..9239a089 100644 --- a/src/google/protobuf/source_context.pb.cc +++ b/src/google/protobuf/source_context.pb.cc @@ -358,6 +358,14 @@ void SourceContext::set_file_name(const ::std::string& value) { file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.SourceContext.file_name) } +#if LANG_CXX11 +void SourceContext::set_file_name(::std::string&& value) { + + file_name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceContext.file_name) +} +#endif void SourceContext::set_file_name(const char* value) { file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); diff --git a/src/google/protobuf/source_context.pb.h b/src/google/protobuf/source_context.pb.h index 22150b5e..ed38ba2c 100644 --- a/src/google/protobuf/source_context.pb.h +++ b/src/google/protobuf/source_context.pb.h @@ -116,6 +116,9 @@ class LIBPROTOBUF_EXPORT SourceContext : public ::google::protobuf::Message /* @ static const int kFileNameFieldNumber = 1; const ::std::string& file_name() const; void set_file_name(const ::std::string& value); + #if LANG_CXX11 + void set_file_name(::std::string&& value); + #endif void set_file_name(const char* value); void set_file_name(const char* value, size_t size); ::std::string* mutable_file_name(); @@ -155,6 +158,14 @@ inline void SourceContext::set_file_name(const ::std::string& value) { file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:google.protobuf.SourceContext.file_name) } +#if LANG_CXX11 +inline void SourceContext::set_file_name(::std::string&& value) { + + file_name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceContext.file_name) +} +#endif inline void SourceContext::set_file_name(const char* value) { file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); -- cgit v1.2.3