aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-11-04 08:21:56 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-11-04 08:21:56 -0700
commit32df467f1189c2b1bc7010b0a99932a7a3fb2684 (patch)
tree106201276069914dcdcf2d9727047167486887a4 /include/grpc++
parent41fd9f2343ad39fc6db1b417ee403c976fc4b00f (diff)
parent852c58e8ae64ccd7361ab0bdc36f3297960c9d5b (diff)
Merge github.com:grpc/grpc into grpc_slice
Diffstat (limited to 'include/grpc++')
-rw-r--r--include/grpc++/alarm.h2
-rw-r--r--include/grpc++/channel.h20
-rw-r--r--include/grpc++/ext/proto_server_reflection_plugin.h12
-rw-r--r--include/grpc++/ext/reflection.grpc.pb.h188
-rw-r--r--include/grpc++/ext/reflection.pb.h2125
-rw-r--r--include/grpc++/generic/async_generic_service.h4
-rw-r--r--include/grpc++/generic/generic_stub.h2
-rw-r--r--include/grpc++/impl/codegen/async_stream.h64
-rw-r--r--include/grpc++/impl/codegen/async_unary_call.h9
-rw-r--r--include/grpc++/impl/codegen/call.h14
-rw-r--r--include/grpc++/impl/codegen/client_context.h6
-rw-r--r--include/grpc++/impl/codegen/config.h83
-rw-r--r--include/grpc++/impl/codegen/core_codegen.h67
-rw-r--r--include/grpc++/impl/codegen/impl/sync.h45
-rw-r--r--include/grpc++/impl/codegen/method_handler_impl.h10
-rw-r--r--include/grpc++/impl/codegen/proto_utils.h22
-rw-r--r--include/grpc++/impl/codegen/server_context.h2
-rw-r--r--include/grpc++/impl/codegen/server_interface.h10
-rw-r--r--include/grpc++/impl/codegen/sync.h45
-rw-r--r--include/grpc++/impl/codegen/sync_cxx11.h49
-rw-r--r--include/grpc++/impl/codegen/sync_no_cxx11.h111
-rw-r--r--include/grpc++/impl/codegen/sync_stream.h76
-rw-r--r--include/grpc++/impl/codegen/time.h4
-rw-r--r--include/grpc++/impl/grpc_library.h8
-rw-r--r--include/grpc++/impl/sync.h39
-rw-r--r--include/grpc++/impl/thd.h45
-rw-r--r--include/grpc++/impl/thd_cxx11.h45
-rw-r--r--include/grpc++/impl/thd_no_cxx11.h117
-rw-r--r--include/grpc++/resource_quota.h2
-rw-r--r--include/grpc++/server.h28
-rw-r--r--include/grpc++/support/byte_buffer.h2
-rw-r--r--include/grpc++/support/channel_arguments.h5
-rw-r--r--include/grpc++/support/slice.h2
33 files changed, 182 insertions, 3081 deletions
diff --git a/include/grpc++/alarm.h b/include/grpc++/alarm.h
index 1470fe8d97..9a15167cc7 100644
--- a/include/grpc++/alarm.h
+++ b/include/grpc++/alarm.h
@@ -78,7 +78,7 @@ class Alarm : private GrpcLibraryCodegen {
class AlarmEntry : public CompletionQueueTag {
public:
AlarmEntry(void* tag) : tag_(tag) {}
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE {
+ bool FinalizeResult(void** tag, bool* status) override {
*tag = tag_;
return true;
}
diff --git a/include/grpc++/channel.h b/include/grpc++/channel.h
index c535d57bff..c8360282e7 100644
--- a/include/grpc++/channel.h
+++ b/include/grpc++/channel.h
@@ -46,16 +46,16 @@ struct grpc_channel;
namespace grpc {
/// Channels represent a connection to an endpoint. Created by \a CreateChannel.
-class Channel GRPC_FINAL : public ChannelInterface,
- public CallHook,
- public std::enable_shared_from_this<Channel>,
- private GrpcLibraryCodegen {
+class Channel final : public ChannelInterface,
+ public CallHook,
+ public std::enable_shared_from_this<Channel>,
+ private GrpcLibraryCodegen {
public:
~Channel();
/// Get the current channel state. If the channel is in IDLE and
/// \a try_to_connect is set to true, try to connect.
- grpc_connectivity_state GetState(bool try_to_connect) GRPC_OVERRIDE;
+ grpc_connectivity_state GetState(bool try_to_connect) override;
private:
template <class InputMessage, class OutputMessage>
@@ -69,15 +69,15 @@ class Channel GRPC_FINAL : public ChannelInterface,
Channel(const grpc::string& host, grpc_channel* c_channel);
Call CreateCall(const RpcMethod& method, ClientContext* context,
- CompletionQueue* cq) GRPC_OVERRIDE;
- void PerformOpsOnCall(CallOpSetInterface* ops, Call* call) GRPC_OVERRIDE;
- void* RegisterMethod(const char* method) GRPC_OVERRIDE;
+ CompletionQueue* cq) override;
+ void PerformOpsOnCall(CallOpSetInterface* ops, Call* call) override;
+ void* RegisterMethod(const char* method) override;
void NotifyOnStateChangeImpl(grpc_connectivity_state last_observed,
gpr_timespec deadline, CompletionQueue* cq,
- void* tag) GRPC_OVERRIDE;
+ void* tag) override;
bool WaitForStateChangeImpl(grpc_connectivity_state last_observed,
- gpr_timespec deadline) GRPC_OVERRIDE;
+ gpr_timespec deadline) override;
const grpc::string host_;
grpc_channel* const c_channel_; // owned
diff --git a/include/grpc++/ext/proto_server_reflection_plugin.h b/include/grpc++/ext/proto_server_reflection_plugin.h
index 3e54882d41..66f39eb876 100644
--- a/include/grpc++/ext/proto_server_reflection_plugin.h
+++ b/include/grpc++/ext/proto_server_reflection_plugin.h
@@ -48,12 +48,12 @@ namespace reflection {
class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin {
public:
ProtoServerReflectionPlugin();
- ::grpc::string name() GRPC_OVERRIDE;
- void InitServer(::grpc::ServerInitializer* si) GRPC_OVERRIDE;
- void Finish(::grpc::ServerInitializer* si) GRPC_OVERRIDE;
- void ChangeArguments(const ::grpc::string& name, void* value) GRPC_OVERRIDE;
- bool has_async_methods() const GRPC_OVERRIDE;
- bool has_sync_methods() const GRPC_OVERRIDE;
+ ::grpc::string name() override;
+ void InitServer(::grpc::ServerInitializer* si) override;
+ void Finish(::grpc::ServerInitializer* si) override;
+ void ChangeArguments(const ::grpc::string& name, void* value) override;
+ bool has_async_methods() const override;
+ bool has_sync_methods() const override;
private:
std::shared_ptr<grpc::ProtoServerReflection> reflection_service_;
diff --git a/include/grpc++/ext/reflection.grpc.pb.h b/include/grpc++/ext/reflection.grpc.pb.h
deleted file mode 100644
index 151271c65b..0000000000
--- a/include/grpc++/ext/reflection.grpc.pb.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-
-// Generated by tools/codegen/extensions/gen_reflection_proto.sh
-// If you make any local change, they will be lost.
-// source: reflection.proto
-// Original file comments:
-// Copyright 2016, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Service exported by server reflection
-//
-#ifndef GRPC_reflection_2eproto__INCLUDED
-#define GRPC_reflection_2eproto__INCLUDED
-
-#include <grpc++/ext/reflection.pb.h>
-
-#include <grpc++/impl/codegen/async_stream.h>
-#include <grpc++/impl/codegen/async_unary_call.h>
-#include <grpc++/impl/codegen/method_handler_impl.h>
-#include <grpc++/impl/codegen/proto_utils.h>
-#include <grpc++/impl/codegen/rpc_method.h>
-#include <grpc++/impl/codegen/service_type.h>
-#include <grpc++/impl/codegen/status.h>
-#include <grpc++/impl/codegen/stub_options.h>
-#include <grpc++/impl/codegen/sync_stream.h>
-
-namespace grpc {
-class CompletionQueue;
-class Channel;
-class RpcService;
-class ServerCompletionQueue;
-class ServerContext;
-} // namespace grpc
-
-namespace grpc {
-namespace reflection {
-namespace v1alpha {
-
-class ServerReflection GRPC_FINAL {
- public:
- class StubInterface {
- public:
- virtual ~StubInterface() {}
- // The reflection service is structured as a bidirectional stream, ensuring
- // all related requests go to a single server.
- std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> ServerReflectionInfo(::grpc::ClientContext* context) {
- return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(ServerReflectionInfoRaw(context));
- }
- std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> AsyncServerReflectionInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
- return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(AsyncServerReflectionInfoRaw(context, cq, tag));
- }
- private:
- virtual ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflectionInfoRaw(::grpc::ClientContext* context) = 0;
- virtual ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0;
- };
- class Stub GRPC_FINAL : public StubInterface {
- public:
- Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
- std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> ServerReflectionInfo(::grpc::ClientContext* context) {
- return std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(ServerReflectionInfoRaw(context));
- }
- std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> AsyncServerReflectionInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
- return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(AsyncServerReflectionInfoRaw(context, cq, tag));
- }
-
- private:
- std::shared_ptr< ::grpc::ChannelInterface> channel_;
- ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflectionInfoRaw(::grpc::ClientContext* context) GRPC_OVERRIDE;
- ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE;
- const ::grpc::RpcMethod rpcmethod_ServerReflectionInfo_;
- };
- static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
-
- class Service : public ::grpc::Service {
- public:
- Service();
- virtual ~Service();
- // The reflection service is structured as a bidirectional stream, ensuring
- // all related requests go to a single server.
- virtual ::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream);
- };
- template <class BaseClass>
- class WithAsyncMethod_ServerReflectionInfo : public BaseClass {
- private:
- void BaseClassMustBeDerivedFromService(const Service *service) {}
- public:
- WithAsyncMethod_ServerReflectionInfo() {
- ::grpc::Service::MarkMethodAsync(0);
- }
- ~WithAsyncMethod_ServerReflectionInfo() GRPC_OVERRIDE {
- BaseClassMustBeDerivedFromService(this);
- }
- // disable synchronous version of this method
- ::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) GRPC_FINAL GRPC_OVERRIDE {
- abort();
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
- }
- void RequestServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
- ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag);
- }
- };
- typedef WithAsyncMethod_ServerReflectionInfo<Service > AsyncService;
- template <class BaseClass>
- class WithGenericMethod_ServerReflectionInfo : public BaseClass {
- private:
- void BaseClassMustBeDerivedFromService(const Service *service) {}
- public:
- WithGenericMethod_ServerReflectionInfo() {
- ::grpc::Service::MarkMethodGeneric(0);
- }
- ~WithGenericMethod_ServerReflectionInfo() GRPC_OVERRIDE {
- BaseClassMustBeDerivedFromService(this);
- }
- // disable synchronous version of this method
- ::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) GRPC_FINAL GRPC_OVERRIDE {
- abort();
- return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
- }
- };
- typedef Service StreamedUnaryService;
- typedef Service SplitStreamedService;
- typedef Service StreamedService;
-};
-
-} // namespace v1alpha
-} // namespace reflection
-} // namespace grpc
-
-
-#endif // GRPC_reflection_2eproto__INCLUDED
diff --git a/include/grpc++/ext/reflection.pb.h b/include/grpc++/ext/reflection.pb.h
deleted file mode 100644
index 6e645af10e..0000000000
--- a/include/grpc++/ext/reflection.pb.h
+++ /dev/null
@@ -1,2125 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-
-// Generated by tools/codegen/extensions/gen_reflection_proto.sh
-// source: reflection.proto
-
-#ifndef PROTOBUF_reflection_2eproto__INCLUDED
-#define PROTOBUF_reflection_2eproto__INCLUDED
-
-#include <string>
-
-#include <google/protobuf/stubs/common.h>
-
-#if GOOGLE_PROTOBUF_VERSION < 3001000
-#error This file was generated by a newer version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please update
-#error your headers.
-#endif
-#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
-#error This file was generated by an older version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please
-#error regenerate this file with a newer version of protoc.
-#endif
-
-#include <google/protobuf/arena.h>
-#include <google/protobuf/arenastring.h>
-#include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/metadata.h>
-#include <google/protobuf/message.h>
-#include <google/protobuf/repeated_field.h>
-#include <google/protobuf/extension_set.h>
-#include <google/protobuf/unknown_field_set.h>
-// @@protoc_insertion_point(includes)
-
-namespace grpc {
-namespace reflection {
-namespace v1alpha {
-
-// Internal implementation detail -- do not call these.
-void protobuf_AddDesc_reflection_2eproto();
-void protobuf_InitDefaults_reflection_2eproto();
-void protobuf_AssignDesc_reflection_2eproto();
-void protobuf_ShutdownFile_reflection_2eproto();
-
-class ErrorResponse;
-class ExtensionNumberResponse;
-class ExtensionRequest;
-class FileDescriptorResponse;
-class ListServiceResponse;
-class ServerReflectionRequest;
-class ServerReflectionResponse;
-class ServiceResponse;
-
-// ===================================================================
-
-class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ServerReflectionRequest) */ {
- public:
- ServerReflectionRequest();
- virtual ~ServerReflectionRequest();
-
- ServerReflectionRequest(const ServerReflectionRequest& from);
-
- inline ServerReflectionRequest& operator=(const ServerReflectionRequest& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const ServerReflectionRequest& default_instance();
-
- enum MessageRequestCase {
- kFileByFilename = 3,
- kFileContainingSymbol = 4,
- kFileContainingExtension = 5,
- kAllExtensionNumbersOfType = 6,
- kListServices = 7,
- MESSAGE_REQUEST_NOT_SET = 0,
- };
-
- static const ServerReflectionRequest* internal_default_instance();
-
- void Swap(ServerReflectionRequest* other);
-
- // implements Message ----------------------------------------------
-
- inline ServerReflectionRequest* New() const { return New(NULL); }
-
- ServerReflectionRequest* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const ServerReflectionRequest& from);
- void MergeFrom(const ServerReflectionRequest& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(ServerReflectionRequest* other);
- void UnsafeMergeFrom(const ServerReflectionRequest& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional string host = 1;
- void clear_host();
- static const int kHostFieldNumber = 1;
- const ::std::string& host() const;
- void set_host(const ::std::string& value);
- void set_host(const char* value);
- void set_host(const char* value, size_t size);
- ::std::string* mutable_host();
- ::std::string* release_host();
- void set_allocated_host(::std::string* host);
-
- // optional string file_by_filename = 3;
- private:
- bool has_file_by_filename() const;
- public:
- void clear_file_by_filename();
- static const int kFileByFilenameFieldNumber = 3;
- const ::std::string& file_by_filename() const;
- void set_file_by_filename(const ::std::string& value);
- void set_file_by_filename(const char* value);
- void set_file_by_filename(const char* value, size_t size);
- ::std::string* mutable_file_by_filename();
- ::std::string* release_file_by_filename();
- void set_allocated_file_by_filename(::std::string* file_by_filename);
-
- // optional string file_containing_symbol = 4;
- private:
- bool has_file_containing_symbol() const;
- public:
- void clear_file_containing_symbol();
- static const int kFileContainingSymbolFieldNumber = 4;
- const ::std::string& file_containing_symbol() const;
- void set_file_containing_symbol(const ::std::string& value);
- void set_file_containing_symbol(const char* value);
- void set_file_containing_symbol(const char* value, size_t size);
- ::std::string* mutable_file_containing_symbol();
- ::std::string* release_file_containing_symbol();
- void set_allocated_file_containing_symbol(::std::string* file_containing_symbol);
-
- // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5;
- bool has_file_containing_extension() const;
- void clear_file_containing_extension();
- static const int kFileContainingExtensionFieldNumber = 5;
- const ::grpc::reflection::v1alpha::ExtensionRequest& file_containing_extension() const;
- ::grpc::reflection::v1alpha::ExtensionRequest* mutable_file_containing_extension();
- ::grpc::reflection::v1alpha::ExtensionRequest* release_file_containing_extension();
- void set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension);
-
- // optional string all_extension_numbers_of_type = 6;
- private:
- bool has_all_extension_numbers_of_type() const;
- public:
- void clear_all_extension_numbers_of_type();
- static const int kAllExtensionNumbersOfTypeFieldNumber = 6;
- const ::std::string& all_extension_numbers_of_type() const;
- void set_all_extension_numbers_of_type(const ::std::string& value);
- void set_all_extension_numbers_of_type(const char* value);
- void set_all_extension_numbers_of_type(const char* value, size_t size);
- ::std::string* mutable_all_extension_numbers_of_type();
- ::std::string* release_all_extension_numbers_of_type();
- void set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type);
-
- // optional string list_services = 7;
- private:
- bool has_list_services() const;
- public:
- void clear_list_services();
- static const int kListServicesFieldNumber = 7;
- const ::std::string& list_services() const;
- void set_list_services(const ::std::string& value);
- void set_list_services(const char* value);
- void set_list_services(const char* value, size_t size);
- ::std::string* mutable_list_services();
- ::std::string* release_list_services();
- void set_allocated_list_services(::std::string* list_services);
-
- MessageRequestCase message_request_case() const;
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ServerReflectionRequest)
- private:
- inline void set_has_file_by_filename();
- inline void set_has_file_containing_symbol();
- inline void set_has_file_containing_extension();
- inline void set_has_all_extension_numbers_of_type();
- inline void set_has_list_services();
-
- inline bool has_message_request() const;
- void clear_message_request();
- inline void clear_has_message_request();
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::internal::ArenaStringPtr host_;
- union MessageRequestUnion {
- MessageRequestUnion() {}
- ::google::protobuf::internal::ArenaStringPtr file_by_filename_;
- ::google::protobuf::internal::ArenaStringPtr file_containing_symbol_;
- ::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension_;
- ::google::protobuf::internal::ArenaStringPtr all_extension_numbers_of_type_;
- ::google::protobuf::internal::ArenaStringPtr list_services_;
- } message_request_;
- mutable int _cached_size_;
- ::google::protobuf::uint32 _oneof_case_[1];
-
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<ServerReflectionRequest> ServerReflectionRequest_default_instance_;
-
-// -------------------------------------------------------------------
-
-class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ExtensionRequest) */ {
- public:
- ExtensionRequest();
- virtual ~ExtensionRequest();
-
- ExtensionRequest(const ExtensionRequest& from);
-
- inline ExtensionRequest& operator=(const ExtensionRequest& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const ExtensionRequest& default_instance();
-
- static const ExtensionRequest* internal_default_instance();
-
- void Swap(ExtensionRequest* other);
-
- // implements Message ----------------------------------------------
-
- inline ExtensionRequest* New() const { return New(NULL); }
-
- ExtensionRequest* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const ExtensionRequest& from);
- void MergeFrom(const ExtensionRequest& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(ExtensionRequest* other);
- void UnsafeMergeFrom(const ExtensionRequest& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional string containing_type = 1;
- void clear_containing_type();
- static const int kContainingTypeFieldNumber = 1;
- const ::std::string& containing_type() const;
- void set_containing_type(const ::std::string& value);
- void set_containing_type(const char* value);
- void set_containing_type(const char* value, size_t size);
- ::std::string* mutable_containing_type();
- ::std::string* release_containing_type();
- void set_allocated_containing_type(::std::string* containing_type);
-
- // optional int32 extension_number = 2;
- void clear_extension_number();
- static const int kExtensionNumberFieldNumber = 2;
- ::google::protobuf::int32 extension_number() const;
- void set_extension_number(::google::protobuf::int32 value);
-
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionRequest)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::internal::ArenaStringPtr containing_type_;
- ::google::protobuf::int32 extension_number_;
- mutable int _cached_size_;
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<ExtensionRequest> ExtensionRequest_default_instance_;
-
-// -------------------------------------------------------------------
-
-class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ServerReflectionResponse) */ {
- public:
- ServerReflectionResponse();
- virtual ~ServerReflectionResponse();
-
- ServerReflectionResponse(const ServerReflectionResponse& from);
-
- inline ServerReflectionResponse& operator=(const ServerReflectionResponse& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const ServerReflectionResponse& default_instance();
-
- enum MessageResponseCase {
- kFileDescriptorResponse = 4,
- kAllExtensionNumbersResponse = 5,
- kListServicesResponse = 6,
- kErrorResponse = 7,
- MESSAGE_RESPONSE_NOT_SET = 0,
- };
-
- static const ServerReflectionResponse* internal_default_instance();
-
- void Swap(ServerReflectionResponse* other);
-
- // implements Message ----------------------------------------------
-
- inline ServerReflectionResponse* New() const { return New(NULL); }
-
- ServerReflectionResponse* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const ServerReflectionResponse& from);
- void MergeFrom(const ServerReflectionResponse& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(ServerReflectionResponse* other);
- void UnsafeMergeFrom(const ServerReflectionResponse& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional string valid_host = 1;
- void clear_valid_host();
- static const int kValidHostFieldNumber = 1;
- const ::std::string& valid_host() const;
- void set_valid_host(const ::std::string& value);
- void set_valid_host(const char* value);
- void set_valid_host(const char* value, size_t size);
- ::std::string* mutable_valid_host();
- ::std::string* release_valid_host();
- void set_allocated_valid_host(::std::string* valid_host);
-
- // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2;
- bool has_original_request() const;
- void clear_original_request();
- static const int kOriginalRequestFieldNumber = 2;
- const ::grpc::reflection::v1alpha::ServerReflectionRequest& original_request() const;
- ::grpc::reflection::v1alpha::ServerReflectionRequest* mutable_original_request();
- ::grpc::reflection::v1alpha::ServerReflectionRequest* release_original_request();
- void set_allocated_original_request(::grpc::reflection::v1alpha::ServerReflectionRequest* original_request);
-
- // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4;
- bool has_file_descriptor_response() const;
- void clear_file_descriptor_response();
- static const int kFileDescriptorResponseFieldNumber = 4;
- const ::grpc::reflection::v1alpha::FileDescriptorResponse& file_descriptor_response() const;
- ::grpc::reflection::v1alpha::FileDescriptorResponse* mutable_file_descriptor_response();
- ::grpc::reflection::v1alpha::FileDescriptorResponse* release_file_descriptor_response();
- void set_allocated_file_descriptor_response(::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response);
-
- // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5;
- bool has_all_extension_numbers_response() const;
- void clear_all_extension_numbers_response();
- static const int kAllExtensionNumbersResponseFieldNumber = 5;
- const ::grpc::reflection::v1alpha::ExtensionNumberResponse& all_extension_numbers_response() const;
- ::grpc::reflection::v1alpha::ExtensionNumberResponse* mutable_all_extension_numbers_response();
- ::grpc::reflection::v1alpha::ExtensionNumberResponse* release_all_extension_numbers_response();
- void set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response);
-
- // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6;
- bool has_list_services_response() const;
- void clear_list_services_response();
- static const int kListServicesResponseFieldNumber = 6;
- const ::grpc::reflection::v1alpha::ListServiceResponse& list_services_response() const;
- ::grpc::reflection::v1alpha::ListServiceResponse* mutable_list_services_response();
- ::grpc::reflection::v1alpha::ListServiceResponse* release_list_services_response();
- void set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response);
-
- // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7;
- bool has_error_response() const;
- void clear_error_response();
- static const int kErrorResponseFieldNumber = 7;
- const ::grpc::reflection::v1alpha::ErrorResponse& error_response() const;
- ::grpc::reflection::v1alpha::ErrorResponse* mutable_error_response();
- ::grpc::reflection::v1alpha::ErrorResponse* release_error_response();
- void set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response);
-
- MessageResponseCase message_response_case() const;
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ServerReflectionResponse)
- private:
- inline void set_has_file_descriptor_response();
- inline void set_has_all_extension_numbers_response();
- inline void set_has_list_services_response();
- inline void set_has_error_response();
-
- inline bool has_message_response() const;
- void clear_message_response();
- inline void clear_has_message_response();
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::internal::ArenaStringPtr valid_host_;
- ::grpc::reflection::v1alpha::ServerReflectionRequest* original_request_;
- union MessageResponseUnion {
- MessageResponseUnion() {}
- ::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response_;
- ::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response_;
- ::grpc::reflection::v1alpha::ListServiceResponse* list_services_response_;
- ::grpc::reflection::v1alpha::ErrorResponse* error_response_;
- } message_response_;
- mutable int _cached_size_;
- ::google::protobuf::uint32 _oneof_case_[1];
-
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<ServerReflectionResponse> ServerReflectionResponse_default_instance_;
-
-// -------------------------------------------------------------------
-
-class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.FileDescriptorResponse) */ {
- public:
- FileDescriptorResponse();
- virtual ~FileDescriptorResponse();
-
- FileDescriptorResponse(const FileDescriptorResponse& from);
-
- inline FileDescriptorResponse& operator=(const FileDescriptorResponse& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const FileDescriptorResponse& default_instance();
-
- static const FileDescriptorResponse* internal_default_instance();
-
- void Swap(FileDescriptorResponse* other);
-
- // implements Message ----------------------------------------------
-
- inline FileDescriptorResponse* New() const { return New(NULL); }
-
- FileDescriptorResponse* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const FileDescriptorResponse& from);
- void MergeFrom(const FileDescriptorResponse& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(FileDescriptorResponse* other);
- void UnsafeMergeFrom(const FileDescriptorResponse& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // repeated bytes file_descriptor_proto = 1;
- int file_descriptor_proto_size() const;
- void clear_file_descriptor_proto();
- static const int kFileDescriptorProtoFieldNumber = 1;
- const ::std::string& file_descriptor_proto(int index) const;
- ::std::string* mutable_file_descriptor_proto(int index);
- void set_file_descriptor_proto(int index, const ::std::string& value);
- void set_file_descriptor_proto(int index, const char* value);
- void set_file_descriptor_proto(int index, const void* value, size_t size);
- ::std::string* add_file_descriptor_proto();
- void add_file_descriptor_proto(const ::std::string& value);
- void add_file_descriptor_proto(const char* value);
- void add_file_descriptor_proto(const void* value, size_t size);
- const ::google::protobuf::RepeatedPtrField< ::std::string>& file_descriptor_proto() const;
- ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_file_descriptor_proto();
-
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.FileDescriptorResponse)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::RepeatedPtrField< ::std::string> file_descriptor_proto_;
- mutable int _cached_size_;
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<FileDescriptorResponse> FileDescriptorResponse_default_instance_;
-
-// -------------------------------------------------------------------
-
-class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ExtensionNumberResponse) */ {
- public:
- ExtensionNumberResponse();
- virtual ~ExtensionNumberResponse();
-
- ExtensionNumberResponse(const ExtensionNumberResponse& from);
-
- inline ExtensionNumberResponse& operator=(const ExtensionNumberResponse& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const ExtensionNumberResponse& default_instance();
-
- static const ExtensionNumberResponse* internal_default_instance();
-
- void Swap(ExtensionNumberResponse* other);
-
- // implements Message ----------------------------------------------
-
- inline ExtensionNumberResponse* New() const { return New(NULL); }
-
- ExtensionNumberResponse* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const ExtensionNumberResponse& from);
- void MergeFrom(const ExtensionNumberResponse& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(ExtensionNumberResponse* other);
- void UnsafeMergeFrom(const ExtensionNumberResponse& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional string base_type_name = 1;
- void clear_base_type_name();
- static const int kBaseTypeNameFieldNumber = 1;
- const ::std::string& base_type_name() const;
- void set_base_type_name(const ::std::string& value);
- void set_base_type_name(const char* value);
- void set_base_type_name(const char* value, size_t size);
- ::std::string* mutable_base_type_name();
- ::std::string* release_base_type_name();
- void set_allocated_base_type_name(::std::string* base_type_name);
-
- // repeated int32 extension_number = 2;
- int extension_number_size() const;
- void clear_extension_number();
- static const int kExtensionNumberFieldNumber = 2;
- ::google::protobuf::int32 extension_number(int index) const;
- void set_extension_number(int index, ::google::protobuf::int32 value);
- void add_extension_number(::google::protobuf::int32 value);
- const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
- extension_number() const;
- ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
- mutable_extension_number();
-
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionNumberResponse)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::RepeatedField< ::google::protobuf::int32 > extension_number_;
- mutable int _extension_number_cached_byte_size_;
- ::google::protobuf::internal::ArenaStringPtr base_type_name_;
- mutable int _cached_size_;
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<ExtensionNumberResponse> ExtensionNumberResponse_default_instance_;
-
-// -------------------------------------------------------------------
-
-class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ListServiceResponse) */ {
- public:
- ListServiceResponse();
- virtual ~ListServiceResponse();
-
- ListServiceResponse(const ListServiceResponse& from);
-
- inline ListServiceResponse& operator=(const ListServiceResponse& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const ListServiceResponse& default_instance();
-
- static const ListServiceResponse* internal_default_instance();
-
- void Swap(ListServiceResponse* other);
-
- // implements Message ----------------------------------------------
-
- inline ListServiceResponse* New() const { return New(NULL); }
-
- ListServiceResponse* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const ListServiceResponse& from);
- void MergeFrom(const ListServiceResponse& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(ListServiceResponse* other);
- void UnsafeMergeFrom(const ListServiceResponse& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;
- int service_size() const;
- void clear_service();
- static const int kServiceFieldNumber = 1;
- const ::grpc::reflection::v1alpha::ServiceResponse& service(int index) const;
- ::grpc::reflection::v1alpha::ServiceResponse* mutable_service(int index);
- ::grpc::reflection::v1alpha::ServiceResponse* add_service();
- ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >*
- mutable_service();
- const ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >&
- service() const;
-
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ListServiceResponse)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse > service_;
- mutable int _cached_size_;
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<ListServiceResponse> ListServiceResponse_default_instance_;
-
-// -------------------------------------------------------------------
-
-class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ServiceResponse) */ {
- public:
- ServiceResponse();
- virtual ~ServiceResponse();
-
- ServiceResponse(const ServiceResponse& from);
-
- inline ServiceResponse& operator=(const ServiceResponse& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const ServiceResponse& default_instance();
-
- static const ServiceResponse* internal_default_instance();
-
- void Swap(ServiceResponse* other);
-
- // implements Message ----------------------------------------------
-
- inline ServiceResponse* New() const { return New(NULL); }
-
- ServiceResponse* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const ServiceResponse& from);
- void MergeFrom(const ServiceResponse& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(ServiceResponse* other);
- void UnsafeMergeFrom(const ServiceResponse& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional string name = 1;
- void clear_name();
- static const int kNameFieldNumber = 1;
- const ::std::string& name() const;
- void set_name(const ::std::string& value);
- void set_name(const char* value);
- void set_name(const char* value, size_t size);
- ::std::string* mutable_name();
- ::std::string* release_name();
- void set_allocated_name(::std::string* name);
-
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ServiceResponse)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::internal::ArenaStringPtr name_;
- mutable int _cached_size_;
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<ServiceResponse> ServiceResponse_default_instance_;
-
-// -------------------------------------------------------------------
-
-class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ErrorResponse) */ {
- public:
- ErrorResponse();
- virtual ~ErrorResponse();
-
- ErrorResponse(const ErrorResponse& from);
-
- inline ErrorResponse& operator=(const ErrorResponse& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const ::google::protobuf::Descriptor* descriptor();
- static const ErrorResponse& default_instance();
-
- static const ErrorResponse* internal_default_instance();
-
- void Swap(ErrorResponse* other);
-
- // implements Message ----------------------------------------------
-
- inline ErrorResponse* New() const { return New(NULL); }
-
- ErrorResponse* New(::google::protobuf::Arena* arena) const;
- void CopyFrom(const ::google::protobuf::Message& from);
- void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const ErrorResponse& from);
- void MergeFrom(const ErrorResponse& from);
- void Clear();
- bool IsInitialized() const;
-
- size_t ByteSizeLong() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* output) const;
- ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
- return InternalSerializeWithCachedSizesToArray(false, output);
- }
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- void InternalSwap(ErrorResponse* other);
- void UnsafeMergeFrom(const ErrorResponse& from);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // optional int32 error_code = 1;
- void clear_error_code();
- static const int kErrorCodeFieldNumber = 1;
- ::google::protobuf::int32 error_code() const;
- void set_error_code(::google::protobuf::int32 value);
-
- // optional string error_message = 2;
- void clear_error_message();
- static const int kErrorMessageFieldNumber = 2;
- const ::std::string& error_message() const;
- void set_error_message(const ::std::string& value);
- void set_error_message(const char* value);
- void set_error_message(const char* value, size_t size);
- ::std::string* mutable_error_message();
- ::std::string* release_error_message();
- void set_allocated_error_message(::std::string* error_message);
-
- // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ErrorResponse)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::internal::ArenaStringPtr error_message_;
- ::google::protobuf::int32 error_code_;
- mutable int _cached_size_;
- friend void protobuf_InitDefaults_reflection_2eproto_impl();
- friend void protobuf_AddDesc_reflection_2eproto_impl();
- friend void protobuf_AssignDesc_reflection_2eproto();
- friend void protobuf_ShutdownFile_reflection_2eproto();
-
- void InitAsDefaultInstance();
-};
-extern ::google::protobuf::internal::ExplicitlyConstructed<ErrorResponse> ErrorResponse_default_instance_;
-
-// ===================================================================
-
-
-// ===================================================================
-
-#if !PROTOBUF_INLINE_NOT_IN_HEADERS
-// ServerReflectionRequest
-
-// optional string host = 1;
-inline void ServerReflectionRequest::clear_host() {
- host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& ServerReflectionRequest::host() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.host)
- return host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ServerReflectionRequest::set_host(const ::std::string& value) {
-
- host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-}
-inline void ServerReflectionRequest::set_host(const char* value) {
-
- host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-}
-inline void ServerReflectionRequest::set_host(const char* value, size_t size) {
-
- host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-}
-inline ::std::string* ServerReflectionRequest::mutable_host() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.host)
- return host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ServerReflectionRequest::release_host() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-
- return host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ServerReflectionRequest::set_allocated_host(::std::string* host) {
- if (host != NULL) {
-
- } else {
-
- }
- host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), host);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.host)
-}
-
-// optional string file_by_filename = 3;
-inline bool ServerReflectionRequest::has_file_by_filename() const {
- return message_request_case() == kFileByFilename;
-}
-inline void ServerReflectionRequest::set_has_file_by_filename() {
- _oneof_case_[0] = kFileByFilename;
-}
-inline void ServerReflectionRequest::clear_file_by_filename() {
- if (has_file_by_filename()) {
- message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_message_request();
- }
-}
-inline const ::std::string& ServerReflectionRequest::file_by_filename() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
- if (has_file_by_filename()) {
- return message_request_.file_by_filename_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
-}
-inline void ServerReflectionRequest::set_file_by_filename(const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
- if (!has_file_by_filename()) {
- clear_message_request();
- set_has_file_by_filename();
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
-}
-inline void ServerReflectionRequest::set_file_by_filename(const char* value) {
- if (!has_file_by_filename()) {
- clear_message_request();
- set_has_file_by_filename();
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
-}
-inline void ServerReflectionRequest::set_file_by_filename(const char* value, size_t size) {
- if (!has_file_by_filename()) {
- clear_message_request();
- set_has_file_by_filename();
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
-}
-inline ::std::string* ServerReflectionRequest::mutable_file_by_filename() {
- if (!has_file_by_filename()) {
- clear_message_request();
- set_has_file_by_filename();
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
- return message_request_.file_by_filename_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ServerReflectionRequest::release_file_by_filename() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
- if (has_file_by_filename()) {
- clear_has_message_request();
- return message_request_.file_by_filename_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionRequest::set_allocated_file_by_filename(::std::string* file_by_filename) {
- if (!has_file_by_filename()) {
- message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_message_request();
- if (file_by_filename != NULL) {
- set_has_file_by_filename();
- message_request_.file_by_filename_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- file_by_filename);
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename)
-}
-
-// optional string file_containing_symbol = 4;
-inline bool ServerReflectionRequest::has_file_containing_symbol() const {
- return message_request_case() == kFileContainingSymbol;
-}
-inline void ServerReflectionRequest::set_has_file_containing_symbol() {
- _oneof_case_[0] = kFileContainingSymbol;
-}
-inline void ServerReflectionRequest::clear_file_containing_symbol() {
- if (has_file_containing_symbol()) {
- message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_message_request();
- }
-}
-inline const ::std::string& ServerReflectionRequest::file_containing_symbol() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
- if (has_file_containing_symbol()) {
- return message_request_.file_containing_symbol_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
-}
-inline void ServerReflectionRequest::set_file_containing_symbol(const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
- if (!has_file_containing_symbol()) {
- clear_message_request();
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
-}
-inline void ServerReflectionRequest::set_file_containing_symbol(const char* value) {
- if (!has_file_containing_symbol()) {
- clear_message_request();
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
-}
-inline void ServerReflectionRequest::set_file_containing_symbol(const char* value, size_t size) {
- if (!has_file_containing_symbol()) {
- clear_message_request();
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
-}
-inline ::std::string* ServerReflectionRequest::mutable_file_containing_symbol() {
- if (!has_file_containing_symbol()) {
- clear_message_request();
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
- return message_request_.file_containing_symbol_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ServerReflectionRequest::release_file_containing_symbol() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
- if (has_file_containing_symbol()) {
- clear_has_message_request();
- return message_request_.file_containing_symbol_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionRequest::set_allocated_file_containing_symbol(::std::string* file_containing_symbol) {
- if (!has_file_containing_symbol()) {
- message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_message_request();
- if (file_containing_symbol != NULL) {
- set_has_file_containing_symbol();
- message_request_.file_containing_symbol_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- file_containing_symbol);
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol)
-}
-
-// optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5;
-inline bool ServerReflectionRequest::has_file_containing_extension() const {
- return message_request_case() == kFileContainingExtension;
-}
-inline void ServerReflectionRequest::set_has_file_containing_extension() {
- _oneof_case_[0] = kFileContainingExtension;
-}
-inline void ServerReflectionRequest::clear_file_containing_extension() {
- if (has_file_containing_extension()) {
- delete message_request_.file_containing_extension_;
- clear_has_message_request();
- }
-}
-inline const ::grpc::reflection::v1alpha::ExtensionRequest& ServerReflectionRequest::file_containing_extension() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension)
- return has_file_containing_extension()
- ? *message_request_.file_containing_extension_
- : ::grpc::reflection::v1alpha::ExtensionRequest::default_instance();
-}
-inline ::grpc::reflection::v1alpha::ExtensionRequest* ServerReflectionRequest::mutable_file_containing_extension() {
- if (!has_file_containing_extension()) {
- clear_message_request();
- set_has_file_containing_extension();
- message_request_.file_containing_extension_ = new ::grpc::reflection::v1alpha::ExtensionRequest;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension)
- return message_request_.file_containing_extension_;
-}
-inline ::grpc::reflection::v1alpha::ExtensionRequest* ServerReflectionRequest::release_file_containing_extension() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension)
- if (has_file_containing_extension()) {
- clear_has_message_request();
- ::grpc::reflection::v1alpha::ExtensionRequest* temp = message_request_.file_containing_extension_;
- message_request_.file_containing_extension_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionRequest::set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension) {
- clear_message_request();
- if (file_containing_extension) {
- set_has_file_containing_extension();
- message_request_.file_containing_extension_ = file_containing_extension;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension)
-}
-
-// optional string all_extension_numbers_of_type = 6;
-inline bool ServerReflectionRequest::has_all_extension_numbers_of_type() const {
- return message_request_case() == kAllExtensionNumbersOfType;
-}
-inline void ServerReflectionRequest::set_has_all_extension_numbers_of_type() {
- _oneof_case_[0] = kAllExtensionNumbersOfType;
-}
-inline void ServerReflectionRequest::clear_all_extension_numbers_of_type() {
- if (has_all_extension_numbers_of_type()) {
- message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_message_request();
- }
-}
-inline const ::std::string& ServerReflectionRequest::all_extension_numbers_of_type() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
- if (has_all_extension_numbers_of_type()) {
- return message_request_.all_extension_numbers_of_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
-}
-inline void ServerReflectionRequest::set_all_extension_numbers_of_type(const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
- if (!has_all_extension_numbers_of_type()) {
- clear_message_request();
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
-}
-inline void ServerReflectionRequest::set_all_extension_numbers_of_type(const char* value) {
- if (!has_all_extension_numbers_of_type()) {
- clear_message_request();
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
-}
-inline void ServerReflectionRequest::set_all_extension_numbers_of_type(const char* value, size_t size) {
- if (!has_all_extension_numbers_of_type()) {
- clear_message_request();
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
-}
-inline ::std::string* ServerReflectionRequest::mutable_all_extension_numbers_of_type() {
- if (!has_all_extension_numbers_of_type()) {
- clear_message_request();
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
- return message_request_.all_extension_numbers_of_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ServerReflectionRequest::release_all_extension_numbers_of_type() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
- if (has_all_extension_numbers_of_type()) {
- clear_has_message_request();
- return message_request_.all_extension_numbers_of_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionRequest::set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type) {
- if (!has_all_extension_numbers_of_type()) {
- message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_message_request();
- if (all_extension_numbers_of_type != NULL) {
- set_has_all_extension_numbers_of_type();
- message_request_.all_extension_numbers_of_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- all_extension_numbers_of_type);
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type)
-}
-
-// optional string list_services = 7;
-inline bool ServerReflectionRequest::has_list_services() const {
- return message_request_case() == kListServices;
-}
-inline void ServerReflectionRequest::set_has_list_services() {
- _oneof_case_[0] = kListServices;
-}
-inline void ServerReflectionRequest::clear_list_services() {
- if (has_list_services()) {
- message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_message_request();
- }
-}
-inline const ::std::string& ServerReflectionRequest::list_services() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
- if (has_list_services()) {
- return message_request_.list_services_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
-}
-inline void ServerReflectionRequest::set_list_services(const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
- if (!has_list_services()) {
- clear_message_request();
- set_has_list_services();
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
-}
-inline void ServerReflectionRequest::set_list_services(const char* value) {
- if (!has_list_services()) {
- clear_message_request();
- set_has_list_services();
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
-}
-inline void ServerReflectionRequest::set_list_services(const char* value, size_t size) {
- if (!has_list_services()) {
- clear_message_request();
- set_has_list_services();
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
-}
-inline ::std::string* ServerReflectionRequest::mutable_list_services() {
- if (!has_list_services()) {
- clear_message_request();
- set_has_list_services();
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
- return message_request_.list_services_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ServerReflectionRequest::release_list_services() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
- if (has_list_services()) {
- clear_has_message_request();
- return message_request_.list_services_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionRequest::set_allocated_list_services(::std::string* list_services) {
- if (!has_list_services()) {
- message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_message_request();
- if (list_services != NULL) {
- set_has_list_services();
- message_request_.list_services_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- list_services);
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.list_services)
-}
-
-inline bool ServerReflectionRequest::has_message_request() const {
- return message_request_case() != MESSAGE_REQUEST_NOT_SET;
-}
-inline void ServerReflectionRequest::clear_has_message_request() {
- _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET;
-}
-inline ServerReflectionRequest::MessageRequestCase ServerReflectionRequest::message_request_case() const {
- return ServerReflectionRequest::MessageRequestCase(_oneof_case_[0]);
-}
-inline const ServerReflectionRequest* ServerReflectionRequest::internal_default_instance() {
- return &ServerReflectionRequest_default_instance_.get();
-}
-// -------------------------------------------------------------------
-
-// ExtensionRequest
-
-// optional string containing_type = 1;
-inline void ExtensionRequest::clear_containing_type() {
- containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& ExtensionRequest::containing_type() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
- return containing_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ExtensionRequest::set_containing_type(const ::std::string& value) {
-
- containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-}
-inline void ExtensionRequest::set_containing_type(const char* value) {
-
- containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-}
-inline void ExtensionRequest::set_containing_type(const char* value, size_t size) {
-
- containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-}
-inline ::std::string* ExtensionRequest::mutable_containing_type() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
- return containing_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ExtensionRequest::release_containing_type() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-
- return containing_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ExtensionRequest::set_allocated_containing_type(::std::string* containing_type) {
- if (containing_type != NULL) {
-
- } else {
-
- }
- containing_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), containing_type);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionRequest.containing_type)
-}
-
-// optional int32 extension_number = 2;
-inline void ExtensionRequest::clear_extension_number() {
- extension_number_ = 0;
-}
-inline ::google::protobuf::int32 ExtensionRequest::extension_number() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.extension_number)
- return extension_number_;
-}
-inline void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) {
-
- extension_number_ = value;
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number)
-}
-
-inline const ExtensionRequest* ExtensionRequest::internal_default_instance() {
- return &ExtensionRequest_default_instance_.get();
-}
-// -------------------------------------------------------------------
-
-// ServerReflectionResponse
-
-// optional string valid_host = 1;
-inline void ServerReflectionResponse::clear_valid_host() {
- valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& ServerReflectionResponse::valid_host() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
- return valid_host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ServerReflectionResponse::set_valid_host(const ::std::string& value) {
-
- valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-}
-inline void ServerReflectionResponse::set_valid_host(const char* value) {
-
- valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-}
-inline void ServerReflectionResponse::set_valid_host(const char* value, size_t size) {
-
- valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-}
-inline ::std::string* ServerReflectionResponse::mutable_valid_host() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
- return valid_host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ServerReflectionResponse::release_valid_host() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-
- return valid_host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ServerReflectionResponse::set_allocated_valid_host(::std::string* valid_host) {
- if (valid_host != NULL) {
-
- } else {
-
- }
- valid_host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), valid_host);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host)
-}
-
-// optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2;
-inline bool ServerReflectionResponse::has_original_request() const {
- return this != internal_default_instance() && original_request_ != NULL;
-}
-inline void ServerReflectionResponse::clear_original_request() {
- if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_;
- original_request_ = NULL;
-}
-inline const ::grpc::reflection::v1alpha::ServerReflectionRequest& ServerReflectionResponse::original_request() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.original_request)
- return original_request_ != NULL ? *original_request_
- : *::grpc::reflection::v1alpha::ServerReflectionRequest::internal_default_instance();
-}
-inline ::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::mutable_original_request() {
-
- if (original_request_ == NULL) {
- original_request_ = new ::grpc::reflection::v1alpha::ServerReflectionRequest;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.original_request)
- return original_request_;
-}
-inline ::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::release_original_request() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.original_request)
-
- ::grpc::reflection::v1alpha::ServerReflectionRequest* temp = original_request_;
- original_request_ = NULL;
- return temp;
-}
-inline void ServerReflectionResponse::set_allocated_original_request(::grpc::reflection::v1alpha::ServerReflectionRequest* original_request) {
- delete original_request_;
- original_request_ = original_request;
- if (original_request) {
-
- } else {
-
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.original_request)
-}
-
-// optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4;
-inline bool ServerReflectionResponse::has_file_descriptor_response() const {
- return message_response_case() == kFileDescriptorResponse;
-}
-inline void ServerReflectionResponse::set_has_file_descriptor_response() {
- _oneof_case_[0] = kFileDescriptorResponse;
-}
-inline void ServerReflectionResponse::clear_file_descriptor_response() {
- if (has_file_descriptor_response()) {
- delete message_response_.file_descriptor_response_;
- clear_has_message_response();
- }
-}
-inline const ::grpc::reflection::v1alpha::FileDescriptorResponse& ServerReflectionResponse::file_descriptor_response() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response)
- return has_file_descriptor_response()
- ? *message_response_.file_descriptor_response_
- : ::grpc::reflection::v1alpha::FileDescriptorResponse::default_instance();
-}
-inline ::grpc::reflection::v1alpha::FileDescriptorResponse* ServerReflectionResponse::mutable_file_descriptor_response() {
- if (!has_file_descriptor_response()) {
- clear_message_response();
- set_has_file_descriptor_response();
- message_response_.file_descriptor_response_ = new ::grpc::reflection::v1alpha::FileDescriptorResponse;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response)
- return message_response_.file_descriptor_response_;
-}
-inline ::grpc::reflection::v1alpha::FileDescriptorResponse* ServerReflectionResponse::release_file_descriptor_response() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response)
- if (has_file_descriptor_response()) {
- clear_has_message_response();
- ::grpc::reflection::v1alpha::FileDescriptorResponse* temp = message_response_.file_descriptor_response_;
- message_response_.file_descriptor_response_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionResponse::set_allocated_file_descriptor_response(::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response) {
- clear_message_response();
- if (file_descriptor_response) {
- set_has_file_descriptor_response();
- message_response_.file_descriptor_response_ = file_descriptor_response;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response)
-}
-
-// optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5;
-inline bool ServerReflectionResponse::has_all_extension_numbers_response() const {
- return message_response_case() == kAllExtensionNumbersResponse;
-}
-inline void ServerReflectionResponse::set_has_all_extension_numbers_response() {
- _oneof_case_[0] = kAllExtensionNumbersResponse;
-}
-inline void ServerReflectionResponse::clear_all_extension_numbers_response() {
- if (has_all_extension_numbers_response()) {
- delete message_response_.all_extension_numbers_response_;
- clear_has_message_response();
- }
-}
-inline const ::grpc::reflection::v1alpha::ExtensionNumberResponse& ServerReflectionResponse::all_extension_numbers_response() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response)
- return has_all_extension_numbers_response()
- ? *message_response_.all_extension_numbers_response_
- : ::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance();
-}
-inline ::grpc::reflection::v1alpha::ExtensionNumberResponse* ServerReflectionResponse::mutable_all_extension_numbers_response() {
- if (!has_all_extension_numbers_response()) {
- clear_message_response();
- set_has_all_extension_numbers_response();
- message_response_.all_extension_numbers_response_ = new ::grpc::reflection::v1alpha::ExtensionNumberResponse;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response)
- return message_response_.all_extension_numbers_response_;
-}
-inline ::grpc::reflection::v1alpha::ExtensionNumberResponse* ServerReflectionResponse::release_all_extension_numbers_response() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response)
- if (has_all_extension_numbers_response()) {
- clear_has_message_response();
- ::grpc::reflection::v1alpha::ExtensionNumberResponse* temp = message_response_.all_extension_numbers_response_;
- message_response_.all_extension_numbers_response_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionResponse::set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response) {
- clear_message_response();
- if (all_extension_numbers_response) {
- set_has_all_extension_numbers_response();
- message_response_.all_extension_numbers_response_ = all_extension_numbers_response;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response)
-}
-
-// optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6;
-inline bool ServerReflectionResponse::has_list_services_response() const {
- return message_response_case() == kListServicesResponse;
-}
-inline void ServerReflectionResponse::set_has_list_services_response() {
- _oneof_case_[0] = kListServicesResponse;
-}
-inline void ServerReflectionResponse::clear_list_services_response() {
- if (has_list_services_response()) {
- delete message_response_.list_services_response_;
- clear_has_message_response();
- }
-}
-inline const ::grpc::reflection::v1alpha::ListServiceResponse& ServerReflectionResponse::list_services_response() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response)
- return has_list_services_response()
- ? *message_response_.list_services_response_
- : ::grpc::reflection::v1alpha::ListServiceResponse::default_instance();
-}
-inline ::grpc::reflection::v1alpha::ListServiceResponse* ServerReflectionResponse::mutable_list_services_response() {
- if (!has_list_services_response()) {
- clear_message_response();
- set_has_list_services_response();
- message_response_.list_services_response_ = new ::grpc::reflection::v1alpha::ListServiceResponse;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response)
- return message_response_.list_services_response_;
-}
-inline ::grpc::reflection::v1alpha::ListServiceResponse* ServerReflectionResponse::release_list_services_response() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response)
- if (has_list_services_response()) {
- clear_has_message_response();
- ::grpc::reflection::v1alpha::ListServiceResponse* temp = message_response_.list_services_response_;
- message_response_.list_services_response_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionResponse::set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response) {
- clear_message_response();
- if (list_services_response) {
- set_has_list_services_response();
- message_response_.list_services_response_ = list_services_response;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response)
-}
-
-// optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7;
-inline bool ServerReflectionResponse::has_error_response() const {
- return message_response_case() == kErrorResponse;
-}
-inline void ServerReflectionResponse::set_has_error_response() {
- _oneof_case_[0] = kErrorResponse;
-}
-inline void ServerReflectionResponse::clear_error_response() {
- if (has_error_response()) {
- delete message_response_.error_response_;
- clear_has_message_response();
- }
-}
-inline const ::grpc::reflection::v1alpha::ErrorResponse& ServerReflectionResponse::error_response() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.error_response)
- return has_error_response()
- ? *message_response_.error_response_
- : ::grpc::reflection::v1alpha::ErrorResponse::default_instance();
-}
-inline ::grpc::reflection::v1alpha::ErrorResponse* ServerReflectionResponse::mutable_error_response() {
- if (!has_error_response()) {
- clear_message_response();
- set_has_error_response();
- message_response_.error_response_ = new ::grpc::reflection::v1alpha::ErrorResponse;
- }
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.error_response)
- return message_response_.error_response_;
-}
-inline ::grpc::reflection::v1alpha::ErrorResponse* ServerReflectionResponse::release_error_response() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.error_response)
- if (has_error_response()) {
- clear_has_message_response();
- ::grpc::reflection::v1alpha::ErrorResponse* temp = message_response_.error_response_;
- message_response_.error_response_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-inline void ServerReflectionResponse::set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response) {
- clear_message_response();
- if (error_response) {
- set_has_error_response();
- message_response_.error_response_ = error_response;
- }
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.error_response)
-}
-
-inline bool ServerReflectionResponse::has_message_response() const {
- return message_response_case() != MESSAGE_RESPONSE_NOT_SET;
-}
-inline void ServerReflectionResponse::clear_has_message_response() {
- _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET;
-}
-inline ServerReflectionResponse::MessageResponseCase ServerReflectionResponse::message_response_case() const {
- return ServerReflectionResponse::MessageResponseCase(_oneof_case_[0]);
-}
-inline const ServerReflectionResponse* ServerReflectionResponse::internal_default_instance() {
- return &ServerReflectionResponse_default_instance_.get();
-}
-// -------------------------------------------------------------------
-
-// FileDescriptorResponse
-
-// repeated bytes file_descriptor_proto = 1;
-inline int FileDescriptorResponse::file_descriptor_proto_size() const {
- return file_descriptor_proto_.size();
-}
-inline void FileDescriptorResponse::clear_file_descriptor_proto() {
- file_descriptor_proto_.Clear();
-}
-inline const ::std::string& FileDescriptorResponse::file_descriptor_proto(int index) const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return file_descriptor_proto_.Get(index);
-}
-inline ::std::string* FileDescriptorResponse::mutable_file_descriptor_proto(int index) {
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return file_descriptor_proto_.Mutable(index);
-}
-inline void FileDescriptorResponse::set_file_descriptor_proto(int index, const ::std::string& value) {
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- file_descriptor_proto_.Mutable(index)->assign(value);
-}
-inline void FileDescriptorResponse::set_file_descriptor_proto(int index, const char* value) {
- file_descriptor_proto_.Mutable(index)->assign(value);
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-inline void FileDescriptorResponse::set_file_descriptor_proto(int index, const void* value, size_t size) {
- file_descriptor_proto_.Mutable(index)->assign(
- reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-inline ::std::string* FileDescriptorResponse::add_file_descriptor_proto() {
- // @@protoc_insertion_point(field_add_mutable:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return file_descriptor_proto_.Add();
-}
-inline void FileDescriptorResponse::add_file_descriptor_proto(const ::std::string& value) {
- file_descriptor_proto_.Add()->assign(value);
- // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-inline void FileDescriptorResponse::add_file_descriptor_proto(const char* value) {
- file_descriptor_proto_.Add()->assign(value);
- // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-inline void FileDescriptorResponse::add_file_descriptor_proto(const void* value, size_t size) {
- file_descriptor_proto_.Add()->assign(reinterpret_cast<const char*>(value), size);
- // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
-}
-inline const ::google::protobuf::RepeatedPtrField< ::std::string>&
-FileDescriptorResponse::file_descriptor_proto() const {
- // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return file_descriptor_proto_;
-}
-inline ::google::protobuf::RepeatedPtrField< ::std::string>*
-FileDescriptorResponse::mutable_file_descriptor_proto() {
- // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto)
- return &file_descriptor_proto_;
-}
-
-inline const FileDescriptorResponse* FileDescriptorResponse::internal_default_instance() {
- return &FileDescriptorResponse_default_instance_.get();
-}
-// -------------------------------------------------------------------
-
-// ExtensionNumberResponse
-
-// optional string base_type_name = 1;
-inline void ExtensionNumberResponse::clear_base_type_name() {
- base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& ExtensionNumberResponse::base_type_name() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
- return base_type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ExtensionNumberResponse::set_base_type_name(const ::std::string& value) {
-
- base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-}
-inline void ExtensionNumberResponse::set_base_type_name(const char* value) {
-
- base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-}
-inline void ExtensionNumberResponse::set_base_type_name(const char* value, size_t size) {
-
- base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-}
-inline ::std::string* ExtensionNumberResponse::mutable_base_type_name() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
- return base_type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ExtensionNumberResponse::release_base_type_name() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-
- return base_type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ExtensionNumberResponse::set_allocated_base_type_name(::std::string* base_type_name) {
- if (base_type_name != NULL) {
-
- } else {
-
- }
- base_type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), base_type_name);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name)
-}
-
-// repeated int32 extension_number = 2;
-inline int ExtensionNumberResponse::extension_number_size() const {
- return extension_number_.size();
-}
-inline void ExtensionNumberResponse::clear_extension_number() {
- extension_number_.Clear();
-}
-inline ::google::protobuf::int32 ExtensionNumberResponse::extension_number(int index) const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
- return extension_number_.Get(index);
-}
-inline void ExtensionNumberResponse::set_extension_number(int index, ::google::protobuf::int32 value) {
- extension_number_.Set(index, value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
-}
-inline void ExtensionNumberResponse::add_extension_number(::google::protobuf::int32 value) {
- extension_number_.Add(value);
- // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
-}
-inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
-ExtensionNumberResponse::extension_number() const {
- // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
- return extension_number_;
-}
-inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
-ExtensionNumberResponse::mutable_extension_number() {
- // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number)
- return &extension_number_;
-}
-
-inline const ExtensionNumberResponse* ExtensionNumberResponse::internal_default_instance() {
- return &ExtensionNumberResponse_default_instance_.get();
-}
-// -------------------------------------------------------------------
-
-// ListServiceResponse
-
-// repeated .grpc.reflection.v1alpha.ServiceResponse service = 1;
-inline int ListServiceResponse::service_size() const {
- return service_.size();
-}
-inline void ListServiceResponse::clear_service() {
- service_.Clear();
-}
-inline const ::grpc::reflection::v1alpha::ServiceResponse& ListServiceResponse::service(int index) const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.service)
- return service_.Get(index);
-}
-inline ::grpc::reflection::v1alpha::ServiceResponse* ListServiceResponse::mutable_service(int index) {
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.service)
- return service_.Mutable(index);
-}
-inline ::grpc::reflection::v1alpha::ServiceResponse* ListServiceResponse::add_service() {
- // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.service)
- return service_.Add();
-}
-inline ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >*
-ListServiceResponse::mutable_service() {
- // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.service)
- return &service_;
-}
-inline const ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >&
-ListServiceResponse::service() const {
- // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.service)
- return service_;
-}
-
-inline const ListServiceResponse* ListServiceResponse::internal_default_instance() {
- return &ListServiceResponse_default_instance_.get();
-}
-// -------------------------------------------------------------------
-
-// ServiceResponse
-
-// optional string name = 1;
-inline void ServiceResponse::clear_name() {
- name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& ServiceResponse::name() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServiceResponse.name)
- return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ServiceResponse::set_name(const ::std::string& value) {
-
- name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServiceResponse.name)
-}
-inline void ServiceResponse::set_name(const char* value) {
-
- name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServiceResponse.name)
-}
-inline void ServiceResponse::set_name(const char* value, size_t size) {
-
- name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServiceResponse.name)
-}
-inline ::std::string* ServiceResponse::mutable_name() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServiceResponse.name)
- return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ServiceResponse::release_name() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServiceResponse.name)
-
- return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ServiceResponse::set_allocated_name(::std::string* name) {
- if (name != NULL) {
-
- } else {
-
- }
- name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServiceResponse.name)
-}
-
-inline const ServiceResponse* ServiceResponse::internal_default_instance() {
- return &ServiceResponse_default_instance_.get();
-}
-// -------------------------------------------------------------------
-
-// ErrorResponse
-
-// optional int32 error_code = 1;
-inline void ErrorResponse::clear_error_code() {
- error_code_ = 0;
-}
-inline ::google::protobuf::int32 ErrorResponse::error_code() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_code)
- return error_code_;
-}
-inline void ErrorResponse::set_error_code(::google::protobuf::int32 value) {
-
- error_code_ = value;
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_code)
-}
-
-// optional string error_message = 2;
-inline void ErrorResponse::clear_error_message() {
- error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& ErrorResponse::error_message() const {
- // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_message)
- return error_message_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ErrorResponse::set_error_message(const ::std::string& value) {
-
- error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_message)
-}
-inline void ErrorResponse::set_error_message(const char* value) {
-
- error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ErrorResponse.error_message)
-}
-inline void ErrorResponse::set_error_message(const char* value, size_t size) {
-
- error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ErrorResponse.error_message)
-}
-inline ::std::string* ErrorResponse::mutable_error_message() {
-
- // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ErrorResponse.error_message)
- return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* ErrorResponse::release_error_message() {
- // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ErrorResponse.error_message)
-
- return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void ErrorResponse::set_allocated_error_message(::std::string* error_message) {
- if (error_message != NULL) {
-
- } else {
-
- }
- error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message);
- // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message)
-}
-
-inline const ErrorResponse* ErrorResponse::internal_default_instance() {
- return &ErrorResponse_default_instance_.get();
-}
-#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace v1alpha
-} // namespace reflection
-} // namespace grpc
-
-// @@protoc_insertion_point(global_scope)
-
-#endif // PROTOBUF_reflection_2eproto__INCLUDED
diff --git a/include/grpc++/generic/async_generic_service.h b/include/grpc++/generic/async_generic_service.h
index 24bae52145..66a5d01d96 100644
--- a/include/grpc++/generic/async_generic_service.h
+++ b/include/grpc++/generic/async_generic_service.h
@@ -44,7 +44,7 @@ namespace grpc {
typedef ServerAsyncReaderWriter<ByteBuffer, ByteBuffer>
GenericServerAsyncReaderWriter;
-class GenericServerContext GRPC_FINAL : public ServerContext {
+class GenericServerContext final : public ServerContext {
public:
const grpc::string& method() const { return method_; }
const grpc::string& host() const { return host_; }
@@ -57,7 +57,7 @@ class GenericServerContext GRPC_FINAL : public ServerContext {
grpc::string host_;
};
-class AsyncGenericService GRPC_FINAL {
+class AsyncGenericService final {
public:
AsyncGenericService() : server_(nullptr) {}
diff --git a/include/grpc++/generic/generic_stub.h b/include/grpc++/generic/generic_stub.h
index d27deae33a..02c00d0d45 100644
--- a/include/grpc++/generic/generic_stub.h
+++ b/include/grpc++/generic/generic_stub.h
@@ -45,7 +45,7 @@ typedef ClientAsyncReaderWriter<ByteBuffer, ByteBuffer>
// Generic stubs provide a type-unsafe interface to call gRPC methods
// by name.
-class GenericStub GRPC_FINAL {
+class GenericStub final {
public:
explicit GenericStub(std::shared_ptr<ChannelInterface> channel)
: channel_(channel) {}
diff --git a/include/grpc++/impl/codegen/async_stream.h b/include/grpc++/impl/codegen/async_stream.h
index 70533aa4d9..1a5cbbd45d 100644
--- a/include/grpc++/impl/codegen/async_stream.h
+++ b/include/grpc++/impl/codegen/async_stream.h
@@ -108,7 +108,7 @@ class ClientAsyncReaderInterface : public ClientAsyncStreamingInterface,
public AsyncReaderInterface<R> {};
template <class R>
-class ClientAsyncReader GRPC_FINAL : public ClientAsyncReaderInterface<R> {
+class ClientAsyncReader final : public ClientAsyncReaderInterface<R> {
public:
/// Create a stream and write the first request out.
template <class W>
@@ -125,7 +125,7 @@ class ClientAsyncReader GRPC_FINAL : public ClientAsyncReaderInterface<R> {
call_.PerformOps(&init_ops_);
}
- void ReadInitialMetadata(void* tag) GRPC_OVERRIDE {
+ void ReadInitialMetadata(void* tag) override {
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_);
meta_ops_.set_output_tag(tag);
@@ -133,7 +133,7 @@ class ClientAsyncReader GRPC_FINAL : public ClientAsyncReaderInterface<R> {
call_.PerformOps(&meta_ops_);
}
- void Read(R* msg, void* tag) GRPC_OVERRIDE {
+ void Read(R* msg, void* tag) override {
read_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
read_ops_.RecvInitialMetadata(context_);
@@ -142,7 +142,7 @@ class ClientAsyncReader GRPC_FINAL : public ClientAsyncReaderInterface<R> {
call_.PerformOps(&read_ops_);
}
- void Finish(Status* status, void* tag) GRPC_OVERRIDE {
+ void Finish(Status* status, void* tag) override {
finish_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
finish_ops_.RecvInitialMetadata(context_);
@@ -174,7 +174,7 @@ class ClientAsyncWriterInterface : public ClientAsyncStreamingInterface,
};
template <class W>
-class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface<W> {
+class ClientAsyncWriter final : public ClientAsyncWriterInterface<W> {
public:
template <class R>
ClientAsyncWriter(ChannelInterface* channel, CompletionQueue* cq,
@@ -190,7 +190,7 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface<W> {
call_.PerformOps(&init_ops_);
}
- void ReadInitialMetadata(void* tag) GRPC_OVERRIDE {
+ void ReadInitialMetadata(void* tag) override {
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_);
meta_ops_.set_output_tag(tag);
@@ -198,20 +198,20 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface<W> {
call_.PerformOps(&meta_ops_);
}
- void Write(const W& msg, void* tag) GRPC_OVERRIDE {
+ void Write(const W& msg, void* tag) override {
write_ops_.set_output_tag(tag);
// TODO(ctiller): don't assert
GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok());
call_.PerformOps(&write_ops_);
}
- void WritesDone(void* tag) GRPC_OVERRIDE {
+ void WritesDone(void* tag) override {
writes_done_ops_.set_output_tag(tag);
writes_done_ops_.ClientSendClose();
call_.PerformOps(&writes_done_ops_);
}
- void Finish(Status* status, void* tag) GRPC_OVERRIDE {
+ void Finish(Status* status, void* tag) override {
finish_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
finish_ops_.RecvInitialMetadata(context_);
@@ -246,7 +246,7 @@ class ClientAsyncReaderWriterInterface : public ClientAsyncStreamingInterface,
};
template <class W, class R>
-class ClientAsyncReaderWriter GRPC_FINAL
+class ClientAsyncReaderWriter final
: public ClientAsyncReaderWriterInterface<W, R> {
public:
ClientAsyncReaderWriter(ChannelInterface* channel, CompletionQueue* cq,
@@ -259,7 +259,7 @@ class ClientAsyncReaderWriter GRPC_FINAL
call_.PerformOps(&init_ops_);
}
- void ReadInitialMetadata(void* tag) GRPC_OVERRIDE {
+ void ReadInitialMetadata(void* tag) override {
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_);
meta_ops_.set_output_tag(tag);
@@ -267,7 +267,7 @@ class ClientAsyncReaderWriter GRPC_FINAL
call_.PerformOps(&meta_ops_);
}
- void Read(R* msg, void* tag) GRPC_OVERRIDE {
+ void Read(R* msg, void* tag) override {
read_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
read_ops_.RecvInitialMetadata(context_);
@@ -276,20 +276,20 @@ class ClientAsyncReaderWriter GRPC_FINAL
call_.PerformOps(&read_ops_);
}
- void Write(const W& msg, void* tag) GRPC_OVERRIDE {
+ void Write(const W& msg, void* tag) override {
write_ops_.set_output_tag(tag);
// TODO(ctiller): don't assert
GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok());
call_.PerformOps(&write_ops_);
}
- void WritesDone(void* tag) GRPC_OVERRIDE {
+ void WritesDone(void* tag) override {
writes_done_ops_.set_output_tag(tag);
writes_done_ops_.ClientSendClose();
call_.PerformOps(&writes_done_ops_);
}
- void Finish(Status* status, void* tag) GRPC_OVERRIDE {
+ void Finish(Status* status, void* tag) override {
finish_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
finish_ops_.RecvInitialMetadata(context_);
@@ -319,12 +319,12 @@ class ServerAsyncReaderInterface : public ServerAsyncStreamingInterface,
};
template <class W, class R>
-class ServerAsyncReader GRPC_FINAL : public ServerAsyncReaderInterface<W, R> {
+class ServerAsyncReader final : public ServerAsyncReaderInterface<W, R> {
public:
explicit ServerAsyncReader(ServerContext* ctx)
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {}
- void SendInitialMetadata(void* tag) GRPC_OVERRIDE {
+ void SendInitialMetadata(void* tag) override {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
meta_ops_.set_output_tag(tag);
@@ -337,13 +337,13 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncReaderInterface<W, R> {
call_.PerformOps(&meta_ops_);
}
- void Read(R* msg, void* tag) GRPC_OVERRIDE {
+ void Read(R* msg, void* tag) override {
read_ops_.set_output_tag(tag);
read_ops_.RecvMessage(msg);
call_.PerformOps(&read_ops_);
}
- void Finish(const W& msg, const Status& status, void* tag) GRPC_OVERRIDE {
+ void Finish(const W& msg, const Status& status, void* tag) override {
finish_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_,
@@ -363,7 +363,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncReaderInterface<W, R> {
call_.PerformOps(&finish_ops_);
}
- void FinishWithError(const Status& status, void* tag) GRPC_OVERRIDE {
+ void FinishWithError(const Status& status, void* tag) override {
GPR_CODEGEN_ASSERT(!status.ok());
finish_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) {
@@ -379,7 +379,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncReaderInterface<W, R> {
}
private:
- void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; }
+ void BindCall(Call* call) override { call_ = *call; }
Call call_;
ServerContext* ctx_;
@@ -398,12 +398,12 @@ class ServerAsyncWriterInterface : public ServerAsyncStreamingInterface,
};
template <class W>
-class ServerAsyncWriter GRPC_FINAL : public ServerAsyncWriterInterface<W> {
+class ServerAsyncWriter final : public ServerAsyncWriterInterface<W> {
public:
explicit ServerAsyncWriter(ServerContext* ctx)
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {}
- void SendInitialMetadata(void* tag) GRPC_OVERRIDE {
+ void SendInitialMetadata(void* tag) override {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
meta_ops_.set_output_tag(tag);
@@ -416,7 +416,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncWriterInterface<W> {
call_.PerformOps(&meta_ops_);
}
- void Write(const W& msg, void* tag) GRPC_OVERRIDE {
+ void Write(const W& msg, void* tag) override {
write_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) {
write_ops_.SendInitialMetadata(ctx_->initial_metadata_,
@@ -431,7 +431,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncWriterInterface<W> {
call_.PerformOps(&write_ops_);
}
- void Finish(const Status& status, void* tag) GRPC_OVERRIDE {
+ void Finish(const Status& status, void* tag) override {
finish_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_,
@@ -446,7 +446,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncWriterInterface<W> {
}
private:
- void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; }
+ void BindCall(Call* call) override { call_ = *call; }
Call call_;
ServerContext* ctx_;
@@ -465,13 +465,13 @@ class ServerAsyncReaderWriterInterface : public ServerAsyncStreamingInterface,
};
template <class W, class R>
-class ServerAsyncReaderWriter GRPC_FINAL
+class ServerAsyncReaderWriter final
: public ServerAsyncReaderWriterInterface<W, R> {
public:
explicit ServerAsyncReaderWriter(ServerContext* ctx)
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {}
- void SendInitialMetadata(void* tag) GRPC_OVERRIDE {
+ void SendInitialMetadata(void* tag) override {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
meta_ops_.set_output_tag(tag);
@@ -484,13 +484,13 @@ class ServerAsyncReaderWriter GRPC_FINAL
call_.PerformOps(&meta_ops_);
}
- void Read(R* msg, void* tag) GRPC_OVERRIDE {
+ void Read(R* msg, void* tag) override {
read_ops_.set_output_tag(tag);
read_ops_.RecvMessage(msg);
call_.PerformOps(&read_ops_);
}
- void Write(const W& msg, void* tag) GRPC_OVERRIDE {
+ void Write(const W& msg, void* tag) override {
write_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) {
write_ops_.SendInitialMetadata(ctx_->initial_metadata_,
@@ -505,7 +505,7 @@ class ServerAsyncReaderWriter GRPC_FINAL
call_.PerformOps(&write_ops_);
}
- void Finish(const Status& status, void* tag) GRPC_OVERRIDE {
+ void Finish(const Status& status, void* tag) override {
finish_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_,
@@ -522,7 +522,7 @@ class ServerAsyncReaderWriter GRPC_FINAL
private:
friend class ::grpc::Server;
- void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; }
+ void BindCall(Call* call) override { call_ = *call; }
Call call_;
ServerContext* ctx_;
diff --git a/include/grpc++/impl/codegen/async_unary_call.h b/include/grpc++/impl/codegen/async_unary_call.h
index 87c94d6507..b77a16b699 100644
--- a/include/grpc++/impl/codegen/async_unary_call.h
+++ b/include/grpc++/impl/codegen/async_unary_call.h
@@ -55,7 +55,7 @@ class ClientAsyncResponseReaderInterface {
};
template <class R>
-class ClientAsyncResponseReader GRPC_FINAL
+class ClientAsyncResponseReader final
: public ClientAsyncResponseReaderInterface<R> {
public:
template <class W>
@@ -113,13 +113,12 @@ class ClientAsyncResponseReader GRPC_FINAL
};
template <class W>
-class ServerAsyncResponseWriter GRPC_FINAL
- : public ServerAsyncStreamingInterface {
+class ServerAsyncResponseWriter final : public ServerAsyncStreamingInterface {
public:
explicit ServerAsyncResponseWriter(ServerContext* ctx)
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {}
- void SendInitialMetadata(void* tag) GRPC_OVERRIDE {
+ void SendInitialMetadata(void* tag) override {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
meta_buf_.set_output_tag(tag);
@@ -168,7 +167,7 @@ class ServerAsyncResponseWriter GRPC_FINAL
}
private:
- void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; }
+ void BindCall(Call* call) override { call_ = *call; }
Call call_;
ServerContext* ctx_;
diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h
index e211373e7d..6ab00612f6 100644
--- a/include/grpc++/impl/codegen/call.h
+++ b/include/grpc++/impl/codegen/call.h
@@ -337,16 +337,16 @@ class DeserializeFunc {
};
template <class R>
-class DeserializeFuncType GRPC_FINAL : public DeserializeFunc {
+class DeserializeFuncType final : public DeserializeFunc {
public:
DeserializeFuncType(R* message) : message_(message) {}
Status Deserialize(grpc_byte_buffer* buf,
- int max_receive_message_size) GRPC_OVERRIDE {
+ int max_receive_message_size) override {
return SerializationTraits<R>::Deserialize(buf, message_,
max_receive_message_size);
}
- ~DeserializeFuncType() GRPC_OVERRIDE {}
+ ~DeserializeFuncType() override {}
private:
R* message_; // Not a managed pointer because management is external to this
@@ -603,7 +603,7 @@ class CallOpSet : public CallOpSetInterface,
public Op6 {
public:
CallOpSet() : return_tag_(this) {}
- void FillOps(grpc_op* ops, size_t* nops) GRPC_OVERRIDE {
+ void FillOps(grpc_op* ops, size_t* nops) override {
this->Op1::AddOp(ops, nops);
this->Op2::AddOp(ops, nops);
this->Op3::AddOp(ops, nops);
@@ -612,7 +612,7 @@ class CallOpSet : public CallOpSetInterface,
this->Op6::AddOp(ops, nops);
}
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE {
+ bool FinalizeResult(void** tag, bool* status) override {
this->Op1::FinishOp(status, max_receive_message_size_);
this->Op2::FinishOp(status, max_receive_message_size_);
this->Op3::FinishOp(status, max_receive_message_size_);
@@ -639,14 +639,14 @@ template <class Op1 = CallNoOp<1>, class Op2 = CallNoOp<2>,
class Op5 = CallNoOp<5>, class Op6 = CallNoOp<6>>
class SneakyCallOpSet : public CallOpSet<Op1, Op2, Op3, Op4, Op5, Op6> {
public:
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE {
+ bool FinalizeResult(void** tag, bool* status) override {
typedef CallOpSet<Op1, Op2, Op3, Op4, Op5, Op6> Base;
return Base::FinalizeResult(tag, status) && false;
}
};
// Straightforward wrapping of the C call object
-class Call GRPC_FINAL {
+class Call final {
public:
/* call is owned by the caller */
Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq)
diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h
index a330ed06bb..777b2f8847 100644
--- a/include/grpc++/impl/codegen/client_context.h
+++ b/include/grpc++/impl/codegen/client_context.h
@@ -51,6 +51,7 @@
#include <map>
#include <memory>
+#include <mutex>
#include <string>
#include <grpc++/impl/codegen/config.h>
@@ -59,7 +60,6 @@
#include <grpc++/impl/codegen/security/auth_context.h>
#include <grpc++/impl/codegen/status.h>
#include <grpc++/impl/codegen/string_ref.h>
-#include <grpc++/impl/codegen/sync.h>
#include <grpc++/impl/codegen/time.h>
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/propagation_bits.h>
@@ -235,12 +235,10 @@ class ClientContext {
/// DEPRECATED: Use set_wait_for_ready() instead.
void set_fail_fast(bool fail_fast) { set_wait_for_ready(!fail_fast); }
-#ifndef GRPC_CXX0X_NO_CHRONO
/// Return the deadline for the client call.
std::chrono::system_clock::time_point deadline() const {
return Timespec2Timepoint(deadline_);
}
-#endif // !GRPC_CXX0X_NO_CHRONO
/// Return a \a gpr_timespec representation of the client call's deadline.
gpr_timespec raw_deadline() const { return deadline_; }
@@ -368,7 +366,7 @@ class ClientContext {
bool idempotent_;
bool cacheable_;
std::shared_ptr<Channel> channel_;
- grpc::mutex mu_;
+ std::mutex mu_;
grpc_call* call_;
bool call_canceled_;
gpr_timespec deadline_;
diff --git a/include/grpc++/impl/codegen/config.h b/include/grpc++/impl/codegen/config.h
index 0c75438868..af3ee5a4cf 100644
--- a/include/grpc++/impl/codegen/config.h
+++ b/include/grpc++/impl/codegen/config.h
@@ -34,80 +34,6 @@
#ifndef GRPCXX_IMPL_CODEGEN_CONFIG_H
#define GRPCXX_IMPL_CODEGEN_CONFIG_H
-#if !defined(GRPC_NO_AUTODETECT_PLATFORM)
-
-#ifdef _MSC_VER
-// Visual Studio 2010 is 1600.
-#if _MSC_VER < 1600
-#error "gRPC is only supported with Visual Studio starting at 2010"
-// Visual Studio 2013 is 1800.
-#elif _MSC_VER < 1800
-#define GRPC_CXX0X_NO_FINAL 1
-#define GRPC_CXX0X_NO_OVERRIDE 1
-#define GRPC_CXX0X_NO_CHRONO 1
-#define GRPC_CXX0X_NO_THREAD 1
-#endif
-#endif // Visual Studio
-
-#ifndef __clang__
-#ifdef __GNUC__
-// nullptr was added in gcc 4.6
-#if (__GNUC__ * 100 + __GNUC_MINOR__ < 406)
-#define GRPC_CXX0X_NO_NULLPTR 1
-#define GRPC_CXX0X_LIMITED_TOSTRING 1
-#endif
-// final and override were added in gcc 4.7
-#if (__GNUC__ * 100 + __GNUC_MINOR__ < 407)
-#define GRPC_CXX0X_NO_FINAL 1
-#define GRPC_CXX0X_NO_OVERRIDE 1
-#endif
-#endif
-#endif
-
-#endif
-
-#ifdef GRPC_CXX0X_NO_FINAL
-#define GRPC_FINAL
-#else
-#define GRPC_FINAL final
-#endif
-
-#ifdef GRPC_CXX0X_NO_OVERRIDE
-#define GRPC_OVERRIDE
-#else
-#define GRPC_OVERRIDE override
-#endif
-
-#ifdef GRPC_CXX0X_NO_NULLPTR
-#include <functional>
-#include <memory>
-namespace grpc {
-const class {
- public:
- template <class T>
- operator T *() const {
- return static_cast<T *>(0);
- }
- template <class T>
- operator std::unique_ptr<T>() const {
- return std::unique_ptr<T>(static_cast<T *>(0));
- }
- template <class T>
- operator std::shared_ptr<T>() const {
- return std::shared_ptr<T>(static_cast<T *>(0));
- }
- operator bool() const { return false; }
- template <class F>
- operator std::function<F>() const {
- return std::function<F>();
- }
-
- private:
- void operator&() const = delete;
-} nullptr = {};
-}
-#endif
-
#ifndef GRPC_CUSTOM_STRING
#include <string>
#define GRPC_CUSTOM_STRING std::string
@@ -117,16 +43,7 @@ namespace grpc {
typedef GRPC_CUSTOM_STRING string;
-#ifdef GRPC_CXX0X_LIMITED_TOSTRING
-inline grpc::string to_string(const int x) {
- return std::to_string(static_cast<const long long int>(x));
-}
-inline grpc::string to_string(const unsigned int x) {
- return std::to_string(static_cast<const long long unsigned int>(x));
-}
-#else
using std::to_string;
-#endif
} // namespace grpc
diff --git a/include/grpc++/impl/codegen/core_codegen.h b/include/grpc++/impl/codegen/core_codegen.h
index 6ab0e17db9..6b5e637e4e 100644
--- a/include/grpc++/impl/codegen/core_codegen.h
+++ b/include/grpc++/impl/codegen/core_codegen.h
@@ -45,56 +45,53 @@ namespace grpc {
/// Implementation of the core codegen interface.
class CoreCodegen : public CoreCodegenInterface {
private:
- grpc_completion_queue* grpc_completion_queue_create(void* reserved)
- GRPC_OVERRIDE;
- void grpc_completion_queue_destroy(grpc_completion_queue* cq) GRPC_OVERRIDE;
+ grpc_completion_queue* grpc_completion_queue_create(void* reserved) override;
+ void grpc_completion_queue_destroy(grpc_completion_queue* cq) override;
grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag,
gpr_timespec deadline,
- void* reserved) GRPC_OVERRIDE;
+ void* reserved) override;
- void* gpr_malloc(size_t size) GRPC_OVERRIDE;
- void gpr_free(void* p) GRPC_OVERRIDE;
+ void* gpr_malloc(size_t size) override;
+ void gpr_free(void* p) override;
- void gpr_mu_init(gpr_mu* mu) GRPC_OVERRIDE;
- void gpr_mu_destroy(gpr_mu* mu) GRPC_OVERRIDE;
- void gpr_mu_lock(gpr_mu* mu) GRPC_OVERRIDE;
- void gpr_mu_unlock(gpr_mu* mu) GRPC_OVERRIDE;
- void gpr_cv_init(gpr_cv* cv) GRPC_OVERRIDE;
- void gpr_cv_destroy(gpr_cv* cv) GRPC_OVERRIDE;
- int gpr_cv_wait(gpr_cv* cv, gpr_mu* mu,
- gpr_timespec abs_deadline) GRPC_OVERRIDE;
- void gpr_cv_signal(gpr_cv* cv) GRPC_OVERRIDE;
- void gpr_cv_broadcast(gpr_cv* cv) GRPC_OVERRIDE;
+ void gpr_mu_init(gpr_mu* mu) override;
+ void gpr_mu_destroy(gpr_mu* mu) override;
+ void gpr_mu_lock(gpr_mu* mu) override;
+ void gpr_mu_unlock(gpr_mu* mu) override;
+ void gpr_cv_init(gpr_cv* cv) override;
+ void gpr_cv_destroy(gpr_cv* cv) override;
+ int gpr_cv_wait(gpr_cv* cv, gpr_mu* mu, gpr_timespec abs_deadline) override;
+ void gpr_cv_signal(gpr_cv* cv) override;
+ void gpr_cv_broadcast(gpr_cv* cv) override;
- void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) GRPC_OVERRIDE;
+ void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override;
int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader,
- grpc_byte_buffer* buffer) GRPC_OVERRIDE;
- void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader* reader)
- GRPC_OVERRIDE;
+ grpc_byte_buffer* buffer) override;
+ void grpc_byte_buffer_reader_destroy(
+ grpc_byte_buffer_reader* reader) override;
int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader,
- grpc_slice* slice) GRPC_OVERRIDE;
+ grpc_slice* slice) override;
grpc_byte_buffer* grpc_raw_byte_buffer_create(grpc_slice* slice,
- size_t nslices) GRPC_OVERRIDE;
+ size_t nslices) override;
- grpc_slice grpc_slice_malloc(size_t length) GRPC_OVERRIDE;
- void grpc_slice_unref(grpc_slice slice) GRPC_OVERRIDE;
- grpc_slice grpc_slice_split_tail(grpc_slice* s, size_t split) GRPC_OVERRIDE;
- void grpc_slice_buffer_add(grpc_slice_buffer* sb,
- grpc_slice slice) GRPC_OVERRIDE;
- void grpc_slice_buffer_pop(grpc_slice_buffer* sb) GRPC_OVERRIDE;
+ grpc_slice grpc_slice_malloc(size_t length) override;
+ void grpc_slice_unref(grpc_slice slice) override;
+ grpc_slice grpc_slice_split_tail(grpc_slice* s, size_t split) override;
+ void grpc_slice_buffer_add(grpc_slice_buffer* sb, grpc_slice slice) override;
+ void grpc_slice_buffer_pop(grpc_slice_buffer* sb) override;
- void grpc_metadata_array_init(grpc_metadata_array* array) GRPC_OVERRIDE;
- void grpc_metadata_array_destroy(grpc_metadata_array* array) GRPC_OVERRIDE;
+ void grpc_metadata_array_init(grpc_metadata_array* array) override;
+ void grpc_metadata_array_destroy(grpc_metadata_array* array) override;
- gpr_timespec gpr_inf_future(gpr_clock_type type) GRPC_OVERRIDE;
- gpr_timespec gpr_time_0(gpr_clock_type type) GRPC_OVERRIDE;
+ gpr_timespec gpr_inf_future(gpr_clock_type type) override;
+ gpr_timespec gpr_time_0(gpr_clock_type type) override;
- virtual const Status& ok() GRPC_OVERRIDE;
- virtual const Status& cancelled() GRPC_OVERRIDE;
+ virtual const Status& ok() override;
+ virtual const Status& cancelled() override;
- void assert_fail(const char* failed_assertion) GRPC_OVERRIDE;
+ void assert_fail(const char* failed_assertion) override;
};
} // namespace grpc
diff --git a/include/grpc++/impl/codegen/impl/sync.h b/include/grpc++/impl/codegen/impl/sync.h
deleted file mode 100644
index 88951de6d0..0000000000
--- a/include/grpc++/impl/codegen/impl/sync.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef GRPCXX_IMPL_CODEGEN_IMPL_SYNC_H
-#define GRPCXX_IMPL_CODEGEN_IMPL_SYNC_H
-
-#include <grpc++/impl/codegen/config.h>
-
-#ifdef GRPC_CXX0X_NO_THREAD
-#include <grpc++/impl/codegen/sync_no_cxx11.h>
-#else
-#include <grpc++/impl/codegen/sync_cxx11.h>
-#endif
-
-#endif // GRPCXX_IMPL_CODEGEN_IMPL_SYNC_H
diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h
index bb992f0e18..d5d27e15cd 100644
--- a/include/grpc++/impl/codegen/method_handler_impl.h
+++ b/include/grpc++/impl/codegen/method_handler_impl.h
@@ -50,7 +50,7 @@ class RpcMethodHandler : public MethodHandler {
ServiceType* service)
: func_(func), service_(service) {}
- void RunHandler(const HandlerParameter& param) GRPC_FINAL {
+ void RunHandler(const HandlerParameter& param) final {
RequestType req;
Status status = SerializationTraits<RequestType>::Deserialize(
param.request, &req, param.max_receive_message_size);
@@ -96,7 +96,7 @@ class ClientStreamingHandler : public MethodHandler {
ServiceType* service)
: func_(func), service_(service) {}
- void RunHandler(const HandlerParameter& param) GRPC_FINAL {
+ void RunHandler(const HandlerParameter& param) final {
ServerReader<RequestType> reader(param.call, param.server_context);
ResponseType rsp;
Status status = func_(service_, param.server_context, &reader, &rsp);
@@ -136,7 +136,7 @@ class ServerStreamingHandler : public MethodHandler {
ServiceType* service)
: func_(func), service_(service) {}
- void RunHandler(const HandlerParameter& param) GRPC_FINAL {
+ void RunHandler(const HandlerParameter& param) final {
RequestType req;
Status status = SerializationTraits<RequestType>::Deserialize(
param.request, &req, param.max_receive_message_size);
@@ -180,7 +180,7 @@ class TemplatedBidiStreamingHandler : public MethodHandler {
std::function<Status(ServerContext*, Streamer*)> func)
: func_(func), write_needed_(WriteNeeded) {}
- void RunHandler(const HandlerParameter& param) GRPC_FINAL {
+ void RunHandler(const HandlerParameter& param) final {
Streamer stream(param.call, param.server_context);
Status status = func_(param.server_context, &stream);
@@ -266,7 +266,7 @@ class UnknownMethodHandler : public MethodHandler {
ops->ServerSendStatus(context->trailing_metadata_, status);
}
- void RunHandler(const HandlerParameter& param) GRPC_FINAL {
+ void RunHandler(const HandlerParameter& param) final {
CallOpSet<CallOpSendInitialMetadata, CallOpServerSendStatus> ops;
FillOps(param.server_context, &ops);
param.call->PerformOps(&ops);
diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h
index d3be48984e..2f15487591 100644
--- a/include/grpc++/impl/codegen/proto_utils.h
+++ b/include/grpc++/impl/codegen/proto_utils.h
@@ -52,7 +52,7 @@ namespace internal {
const int kGrpcBufferWriterMaxBufferLength = 8192;
-class GrpcBufferWriter GRPC_FINAL
+class GrpcBufferWriter final
: public ::grpc::protobuf::io::ZeroCopyOutputStream {
public:
explicit GrpcBufferWriter(grpc_byte_buffer** bp, int block_size)
@@ -61,13 +61,13 @@ class GrpcBufferWriter GRPC_FINAL
slice_buffer_ = &(*bp)->data.raw.slice_buffer;
}
- ~GrpcBufferWriter() GRPC_OVERRIDE {
+ ~GrpcBufferWriter() override {
if (have_backup_) {
g_core_codegen_interface->grpc_slice_unref(backup_slice_);
}
}
- bool Next(void** data, int* size) GRPC_OVERRIDE {
+ bool Next(void** data, int* size) override {
if (have_backup_) {
slice_ = backup_slice_;
have_backup_ = false;
@@ -82,7 +82,7 @@ class GrpcBufferWriter GRPC_FINAL
return true;
}
- void BackUp(int count) GRPC_OVERRIDE {
+ void BackUp(int count) override {
g_core_codegen_interface->grpc_slice_buffer_pop(slice_buffer_);
if (count == block_size_) {
backup_slice_ = slice_;
@@ -95,7 +95,7 @@ class GrpcBufferWriter GRPC_FINAL
byte_count_ -= count;
}
- grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE { return byte_count_; }
+ grpc::protobuf::int64 ByteCount() const override { return byte_count_; }
private:
const int block_size_;
@@ -106,7 +106,7 @@ class GrpcBufferWriter GRPC_FINAL
grpc_slice slice_;
};
-class GrpcBufferReader GRPC_FINAL
+class GrpcBufferReader final
: public ::grpc::protobuf::io::ZeroCopyInputStream {
public:
explicit GrpcBufferReader(grpc_byte_buffer* buffer)
@@ -117,11 +117,11 @@ class GrpcBufferReader GRPC_FINAL
"Couldn't initialize byte buffer reader");
}
}
- ~GrpcBufferReader() GRPC_OVERRIDE {
+ ~GrpcBufferReader() override {
g_core_codegen_interface->grpc_byte_buffer_reader_destroy(&reader_);
}
- bool Next(const void** data, int* size) GRPC_OVERRIDE {
+ bool Next(const void** data, int* size) override {
if (!status_.ok()) {
return false;
}
@@ -147,9 +147,9 @@ class GrpcBufferReader GRPC_FINAL
Status status() const { return status_; }
- void BackUp(int count) GRPC_OVERRIDE { backup_count_ = count; }
+ void BackUp(int count) override { backup_count_ = count; }
- bool Skip(int count) GRPC_OVERRIDE {
+ bool Skip(int count) override {
const void* data;
int size;
while (Next(&data, &size)) {
@@ -164,7 +164,7 @@ class GrpcBufferReader GRPC_FINAL
return false;
}
- grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE {
+ grpc::protobuf::int64 ByteCount() const override {
return byte_count_ - backup_count_;
}
diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h
index ddf50b019d..dd30576379 100644
--- a/include/grpc++/impl/codegen/server_context.h
+++ b/include/grpc++/impl/codegen/server_context.h
@@ -94,11 +94,9 @@ class ServerContext {
ServerContext(); // for async calls
~ServerContext();
-#ifndef GRPC_CXX0X_NO_CHRONO
std::chrono::system_clock::time_point deadline() const {
return Timespec2Timepoint(deadline_);
}
-#endif // !GRPC_CXX0X_NO_CHRONO
gpr_timespec raw_deadline() const { return deadline_; }
diff --git a/include/grpc++/impl/codegen/server_interface.h b/include/grpc++/impl/codegen/server_interface.h
index 5c41ca51b4..41a64bead0 100644
--- a/include/grpc++/impl/codegen/server_interface.h
+++ b/include/grpc++/impl/codegen/server_interface.h
@@ -142,7 +142,7 @@ class ServerInterface : public CallHook {
bool delete_on_finalize);
virtual ~BaseAsyncRequest() {}
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE;
+ bool FinalizeResult(void** tag, bool* status) override;
protected:
ServerInterface* const server_;
@@ -168,7 +168,7 @@ class ServerInterface : public CallHook {
ServerCompletionQueue* notification_cq);
};
- class NoPayloadAsyncRequest GRPC_FINAL : public RegisteredAsyncRequest {
+ class NoPayloadAsyncRequest final : public RegisteredAsyncRequest {
public:
NoPayloadAsyncRequest(void* registered_method, ServerInterface* server,
ServerContext* context,
@@ -183,7 +183,7 @@ class ServerInterface : public CallHook {
};
template <class Message>
- class PayloadAsyncRequest GRPC_FINAL : public RegisteredAsyncRequest {
+ class PayloadAsyncRequest final : public RegisteredAsyncRequest {
public:
PayloadAsyncRequest(void* registered_method, ServerInterface* server,
ServerContext* context,
@@ -196,7 +196,7 @@ class ServerInterface : public CallHook {
IssueRequest(registered_method, &payload_, notification_cq);
}
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE {
+ bool FinalizeResult(void** tag, bool* status) override {
bool serialization_status =
*status && payload_ &&
SerializationTraits<Message>::Deserialize(
@@ -220,7 +220,7 @@ class ServerInterface : public CallHook {
ServerCompletionQueue* notification_cq, void* tag,
bool delete_on_finalize);
- bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE;
+ bool FinalizeResult(void** tag, bool* status) override;
private:
grpc_call_details call_details_;
diff --git a/include/grpc++/impl/codegen/sync.h b/include/grpc++/impl/codegen/sync.h
deleted file mode 100644
index 62194c7708..0000000000
--- a/include/grpc++/impl/codegen/sync.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef GRPCXX_IMPL_CODEGEN_SYNC_H
-#define GRPCXX_IMPL_CODEGEN_SYNC_H
-
-#include <grpc++/impl/codegen/config.h>
-
-#ifdef GRPC_CXX0X_NO_THREAD
-#include <grpc++/impl/codegen/sync_no_cxx11.h>
-#else
-#include <grpc++/impl/codegen/sync_cxx11.h>
-#endif
-
-#endif // GRPCXX_IMPL_CODEGEN_SYNC_H
diff --git a/include/grpc++/impl/codegen/sync_cxx11.h b/include/grpc++/impl/codegen/sync_cxx11.h
deleted file mode 100644
index 6626ca1f94..0000000000
--- a/include/grpc++/impl/codegen/sync_cxx11.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef GRPCXX_IMPL_CODEGEN_SYNC_CXX11_H
-#define GRPCXX_IMPL_CODEGEN_SYNC_CXX11_H
-
-#include <condition_variable>
-#include <mutex>
-
-namespace grpc {
-
-using std::condition_variable;
-using std::mutex;
-using std::lock_guard;
-using std::unique_lock;
-
-} // namespace grpc
-
-#endif // GRPCXX_IMPL_CODEGEN_SYNC_CXX11_H
diff --git a/include/grpc++/impl/codegen/sync_no_cxx11.h b/include/grpc++/impl/codegen/sync_no_cxx11.h
deleted file mode 100644
index 87a6594f7d..0000000000
--- a/include/grpc++/impl/codegen/sync_no_cxx11.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H
-#define GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H
-
-#include <grpc++/impl/codegen/core_codegen_interface.h>
-
-namespace grpc {
-
-extern CoreCodegenInterface *g_core_codegen_interface;
-
-template <class mutex>
-class lock_guard;
-class condition_variable;
-
-class mutex {
- public:
- mutex() { g_core_codegen_interface->gpr_mu_init(&mu_); }
- ~mutex() { g_core_codegen_interface->gpr_mu_destroy(&mu_); }
-
- private:
- ::gpr_mu mu_;
- template <class mutex>
- friend class lock_guard;
- friend class condition_variable;
-};
-
-template <class mutex>
-class lock_guard {
- public:
- lock_guard(mutex &mu) : mu_(mu), locked(true) {
- g_core_codegen_interface->gpr_mu_lock(&mu.mu_);
- }
- ~lock_guard() { unlock_internal(); }
-
- protected:
- void lock_internal() {
- if (!locked) g_core_codegen_interface->gpr_mu_lock(&mu_.mu_);
- locked = true;
- }
- void unlock_internal() {
- if (locked) g_core_codegen_interface->gpr_mu_unlock(&mu_.mu_);
- locked = false;
- }
-
- private:
- mutex &mu_;
- bool locked;
- friend class condition_variable;
-};
-
-template <class mutex>
-class unique_lock : public lock_guard<mutex> {
- public:
- unique_lock(mutex &mu) : lock_guard<mutex>(mu) {}
- void lock() { this->lock_internal(); }
- void unlock() { this->unlock_internal(); }
-};
-
-class condition_variable {
- public:
- condition_variable() { g_core_codegen_interface->gpr_cv_init(&cv_); }
- ~condition_variable() { g_core_codegen_interface->gpr_cv_destroy(&cv_); }
- void wait(lock_guard<mutex> &mu) {
- mu.locked = false;
- g_core_codegen_interface->gpr_cv_wait(
- &cv_, &mu.mu_.mu_,
- g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_REALTIME));
- mu.locked = true;
- }
- void notify_one() { g_core_codegen_interface->gpr_cv_signal(&cv_); }
- void notify_all() { g_core_codegen_interface->gpr_cv_broadcast(&cv_); }
-
- private:
- gpr_cv cv_;
-};
-
-} // namespace grpc
-
-#endif // GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H
diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h
index 9a3efb5119..4d9b074e95 100644
--- a/include/grpc++/impl/codegen/sync_stream.h
+++ b/include/grpc++/impl/codegen/sync_stream.h
@@ -131,7 +131,7 @@ class ClientReaderInterface : public ClientStreamingInterface,
};
template <class R>
-class ClientReader GRPC_FINAL : public ClientReaderInterface<R> {
+class ClientReader final : public ClientReaderInterface<R> {
public:
/// Blocking create a stream and write the first request out.
template <class W>
@@ -150,7 +150,7 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface<R> {
cq_.Pluck(&ops);
}
- void WaitForInitialMetadata() GRPC_OVERRIDE {
+ void WaitForInitialMetadata() override {
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_);
CallOpSet<CallOpRecvInitialMetadata> ops;
@@ -159,12 +159,12 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface<R> {
cq_.Pluck(&ops); /// status ignored
}
- bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ bool NextMessageSize(uint32_t* sz) override {
*sz = call_.max_receive_message_size();
return true;
}
- bool Read(R* msg) GRPC_OVERRIDE {
+ bool Read(R* msg) override {
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops;
if (!context_->initial_metadata_received_) {
ops.RecvInitialMetadata(context_);
@@ -174,7 +174,7 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface<R> {
return cq_.Pluck(&ops) && ops.got_message;
}
- Status Finish() GRPC_OVERRIDE {
+ Status Finish() override {
CallOpSet<CallOpClientRecvStatus> ops;
Status status;
ops.ClientRecvStatus(context_, &status);
@@ -230,7 +230,7 @@ class ClientWriter : public ClientWriterInterface<W> {
}
using WriterInterface<W>::Write;
- bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE {
+ bool Write(const W& msg, const WriteOptions& options) override {
CallOpSet<CallOpSendMessage> ops;
if (!ops.SendMessage(msg, options).ok()) {
return false;
@@ -239,7 +239,7 @@ class ClientWriter : public ClientWriterInterface<W> {
return cq_.Pluck(&ops);
}
- bool WritesDone() GRPC_OVERRIDE {
+ bool WritesDone() override {
CallOpSet<CallOpClientSendClose> ops;
ops.ClientSendClose();
call_.PerformOps(&ops);
@@ -247,7 +247,7 @@ class ClientWriter : public ClientWriterInterface<W> {
}
/// Read the final response and wait for the final status.
- Status Finish() GRPC_OVERRIDE {
+ Status Finish() override {
Status status;
if (!context_->initial_metadata_received_) {
finish_ops_.RecvInitialMetadata(context_);
@@ -287,7 +287,7 @@ class ClientReaderWriterInterface : public ClientStreamingInterface,
};
template <class W, class R>
-class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> {
+class ClientReaderWriter final : public ClientReaderWriterInterface<W, R> {
public:
/// Blocking create a stream.
ClientReaderWriter(ChannelInterface* channel, const RpcMethod& method,
@@ -300,7 +300,7 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> {
cq_.Pluck(&ops);
}
- void WaitForInitialMetadata() GRPC_OVERRIDE {
+ void WaitForInitialMetadata() override {
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_);
CallOpSet<CallOpRecvInitialMetadata> ops;
@@ -309,12 +309,12 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> {
cq_.Pluck(&ops); // status ignored
}
- bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ bool NextMessageSize(uint32_t* sz) override {
*sz = call_.max_receive_message_size();
return true;
}
- bool Read(R* msg) GRPC_OVERRIDE {
+ bool Read(R* msg) override {
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops;
if (!context_->initial_metadata_received_) {
ops.RecvInitialMetadata(context_);
@@ -325,21 +325,21 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> {
}
using WriterInterface<W>::Write;
- bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE {
+ bool Write(const W& msg, const WriteOptions& options) override {
CallOpSet<CallOpSendMessage> ops;
if (!ops.SendMessage(msg, options).ok()) return false;
call_.PerformOps(&ops);
return cq_.Pluck(&ops);
}
- bool WritesDone() GRPC_OVERRIDE {
+ bool WritesDone() override {
CallOpSet<CallOpClientSendClose> ops;
ops.ClientSendClose();
call_.PerformOps(&ops);
return cq_.Pluck(&ops);
}
- Status Finish() GRPC_OVERRIDE {
+ Status Finish() override {
CallOpSet<CallOpRecvInitialMetadata, CallOpClientRecvStatus> ops;
if (!context_->initial_metadata_received_) {
ops.RecvInitialMetadata(context_);
@@ -363,11 +363,11 @@ class ServerReaderInterface : public ServerStreamingInterface,
public ReaderInterface<R> {};
template <class R>
-class ServerReader GRPC_FINAL : public ServerReaderInterface<R> {
+class ServerReader final : public ServerReaderInterface<R> {
public:
ServerReader(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {}
- void SendInitialMetadata() GRPC_OVERRIDE {
+ void SendInitialMetadata() override {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
CallOpSet<CallOpSendInitialMetadata> ops;
@@ -381,12 +381,12 @@ class ServerReader GRPC_FINAL : public ServerReaderInterface<R> {
call_->cq()->Pluck(&ops);
}
- bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ bool NextMessageSize(uint32_t* sz) override {
*sz = call_->max_receive_message_size();
return true;
}
- bool Read(R* msg) GRPC_OVERRIDE {
+ bool Read(R* msg) override {
CallOpSet<CallOpRecvMessage<R>> ops;
ops.RecvMessage(msg);
call_->PerformOps(&ops);
@@ -404,11 +404,11 @@ class ServerWriterInterface : public ServerStreamingInterface,
public WriterInterface<W> {};
template <class W>
-class ServerWriter GRPC_FINAL : public ServerWriterInterface<W> {
+class ServerWriter final : public ServerWriterInterface<W> {
public:
ServerWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {}
- void SendInitialMetadata() GRPC_OVERRIDE {
+ void SendInitialMetadata() override {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
CallOpSet<CallOpSendInitialMetadata> ops;
@@ -423,7 +423,7 @@ class ServerWriter GRPC_FINAL : public ServerWriterInterface<W> {
}
using WriterInterface<W>::Write;
- bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE {
+ bool Write(const W& msg, const WriteOptions& options) override {
CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> ops;
if (!ops.SendMessage(msg, options).ok()) {
return false;
@@ -454,7 +454,7 @@ class ServerReaderWriterInterface : public ServerStreamingInterface,
// Actual implementation of bi-directional streaming
namespace internal {
template <class W, class R>
-class ServerReaderWriterBody GRPC_FINAL {
+class ServerReaderWriterBody final {
public:
ServerReaderWriterBody(Call* call, ServerContext* ctx)
: call_(call), ctx_(ctx) {}
@@ -510,20 +510,20 @@ class ServerReaderWriterBody GRPC_FINAL {
// class to represent the user API for a bidirectional streaming call
template <class W, class R>
-class ServerReaderWriter GRPC_FINAL : public ServerReaderWriterInterface<W, R> {
+class ServerReaderWriter final : public ServerReaderWriterInterface<W, R> {
public:
ServerReaderWriter(Call* call, ServerContext* ctx) : body_(call, ctx) {}
- void SendInitialMetadata() GRPC_OVERRIDE { body_.SendInitialMetadata(); }
+ void SendInitialMetadata() override { body_.SendInitialMetadata(); }
- bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ bool NextMessageSize(uint32_t* sz) override {
return body_.NextMessageSize(sz);
}
- bool Read(R* msg) GRPC_OVERRIDE { return body_.Read(msg); }
+ bool Read(R* msg) override { return body_.Read(msg); }
using WriterInterface<W>::Write;
- bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE {
+ bool Write(const W& msg, const WriteOptions& options) override {
return body_.Write(msg, options);
}
@@ -541,19 +541,19 @@ class ServerReaderWriter GRPC_FINAL : public ServerReaderWriterInterface<W, R> {
/// must have exactly 1 Read and exactly 1 Write, in that order, to function
/// correctly. Otherwise, the RPC is in error.
template <class RequestType, class ResponseType>
-class ServerUnaryStreamer GRPC_FINAL
+class ServerUnaryStreamer final
: public ServerReaderWriterInterface<ResponseType, RequestType> {
public:
ServerUnaryStreamer(Call* call, ServerContext* ctx)
: body_(call, ctx), read_done_(false), write_done_(false) {}
- void SendInitialMetadata() GRPC_OVERRIDE { body_.SendInitialMetadata(); }
+ void SendInitialMetadata() override { body_.SendInitialMetadata(); }
- bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ bool NextMessageSize(uint32_t* sz) override {
return body_.NextMessageSize(sz);
}
- bool Read(RequestType* request) GRPC_OVERRIDE {
+ bool Read(RequestType* request) override {
if (read_done_) {
return false;
}
@@ -563,7 +563,7 @@ class ServerUnaryStreamer GRPC_FINAL
using WriterInterface<ResponseType>::Write;
bool Write(const ResponseType& response,
- const WriteOptions& options) GRPC_OVERRIDE {
+ const WriteOptions& options) override {
if (write_done_ || !read_done_) {
return false;
}
@@ -583,19 +583,19 @@ class ServerUnaryStreamer GRPC_FINAL
/// but the server responds to it as though it were a bidi streaming call that
/// must first have exactly 1 Read and then any number of Writes.
template <class RequestType, class ResponseType>
-class ServerSplitStreamer GRPC_FINAL
+class ServerSplitStreamer final
: public ServerReaderWriterInterface<ResponseType, RequestType> {
public:
ServerSplitStreamer(Call* call, ServerContext* ctx)
: body_(call, ctx), read_done_(false) {}
- void SendInitialMetadata() GRPC_OVERRIDE { body_.SendInitialMetadata(); }
+ void SendInitialMetadata() override { body_.SendInitialMetadata(); }
- bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ bool NextMessageSize(uint32_t* sz) override {
return body_.NextMessageSize(sz);
}
- bool Read(RequestType* request) GRPC_OVERRIDE {
+ bool Read(RequestType* request) override {
if (read_done_) {
return false;
}
@@ -605,7 +605,7 @@ class ServerSplitStreamer GRPC_FINAL
using WriterInterface<ResponseType>::Write;
bool Write(const ResponseType& response,
- const WriteOptions& options) GRPC_OVERRIDE {
+ const WriteOptions& options) override {
return read_done_ && body_.Write(response, options);
}
diff --git a/include/grpc++/impl/codegen/time.h b/include/grpc++/impl/codegen/time.h
index 87c5112d0d..e090ece756 100644
--- a/include/grpc++/impl/codegen/time.h
+++ b/include/grpc++/impl/codegen/time.h
@@ -75,8 +75,6 @@ class TimePoint<gpr_timespec> {
} // namespace grpc
-#ifndef GRPC_CXX0X_NO_CHRONO
-
#include <chrono>
#include <grpc/impl/codegen/grpc_types.h>
@@ -106,6 +104,4 @@ class TimePoint<std::chrono::system_clock::time_point> {
} // namespace grpc
-#endif // !GRPC_CXX0X_NO_CHRONO
-
#endif // GRPCXX_IMPL_CODEGEN_TIME_H
diff --git a/include/grpc++/impl/grpc_library.h b/include/grpc++/impl/grpc_library.h
index 1184d1bf09..ee1d0a9750 100644
--- a/include/grpc++/impl/grpc_library.h
+++ b/include/grpc++/impl/grpc_library.h
@@ -44,17 +44,17 @@
namespace grpc {
namespace internal {
-class GrpcLibrary GRPC_FINAL : public GrpcLibraryInterface {
+class GrpcLibrary final : public GrpcLibraryInterface {
public:
- void init() GRPC_OVERRIDE { grpc_init(); }
- void shutdown() GRPC_OVERRIDE { grpc_shutdown(); }
+ void init() override { grpc_init(); }
+ void shutdown() override { grpc_shutdown(); }
};
static GrpcLibrary g_gli;
static CoreCodegen g_core_codegen;
/// Instantiating this class ensures the proper initialization of gRPC.
-class GrpcLibraryInitializer GRPC_FINAL {
+class GrpcLibraryInitializer final {
public:
GrpcLibraryInitializer() {
if (grpc::g_glip == nullptr) {
diff --git a/include/grpc++/impl/sync.h b/include/grpc++/impl/sync.h
deleted file mode 100644
index 3339cddba4..0000000000
--- a/include/grpc++/impl/sync.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef GRPCXX_IMPL_SYNC_H
-#define GRPCXX_IMPL_SYNC_H
-
-#include <grpc++/impl/codegen/sync.h>
-
-#endif // GRPCXX_IMPL_SYNC_H
diff --git a/include/grpc++/impl/thd.h b/include/grpc++/impl/thd.h
deleted file mode 100644
index f8d4258ac6..0000000000
--- a/include/grpc++/impl/thd.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef GRPCXX_IMPL_THD_H
-#define GRPCXX_IMPL_THD_H
-
-#include <grpc++/support/config.h>
-
-#ifdef GRPC_CXX0X_NO_THREAD
-#include <grpc++/impl/thd_no_cxx11.h>
-#else
-#include <grpc++/impl/thd_cxx11.h>
-#endif
-
-#endif // GRPCXX_IMPL_THD_H
diff --git a/include/grpc++/impl/thd_cxx11.h b/include/grpc++/impl/thd_cxx11.h
deleted file mode 100644
index 2055b1d538..0000000000
--- a/include/grpc++/impl/thd_cxx11.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef GRPCXX_IMPL_THD_CXX11_H
-#define GRPCXX_IMPL_THD_CXX11_H
-
-#include <thread>
-
-namespace grpc {
-
-using std::thread;
-
-} // namespace grpc
-
-#endif // GRPCXX_IMPL_THD_CXX11_H
diff --git a/include/grpc++/impl/thd_no_cxx11.h b/include/grpc++/impl/thd_no_cxx11.h
deleted file mode 100644
index 3f981d3770..0000000000
--- a/include/grpc++/impl/thd_no_cxx11.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef GRPCXX_IMPL_THD_NO_CXX11_H
-#define GRPCXX_IMPL_THD_NO_CXX11_H
-
-#include <grpc/support/thd.h>
-
-namespace grpc {
-
-class thread {
- public:
- template <class T>
- thread(void (T::*fptr)(), T *obj) {
- func_ = new thread_function<T>(fptr, obj);
- joined_ = false;
- start();
- }
- template <class T, class U>
- thread(void (T::*fptr)(U arg), T *obj, U arg) {
- func_ = new thread_function_arg<T, U>(fptr, obj, arg);
- joined_ = false;
- start();
- }
- ~thread() {
- if (!joined_) std::terminate();
- delete func_;
- }
- thread(thread &&other)
- : func_(other.func_), thd_(other.thd_), joined_(other.joined_) {
- other.joined_ = true;
- other.func_ = NULL;
- }
- void join() {
- gpr_thd_join(thd_);
- joined_ = true;
- }
-
- private:
- void start() {
- gpr_thd_options options = gpr_thd_options_default();
- gpr_thd_options_set_joinable(&options);
- gpr_thd_new(&thd_, thread_func, (void *)func_, &options);
- }
- static void thread_func(void *arg) {
- thread_function_base *func = (thread_function_base *)arg;
- func->call();
- }
- class thread_function_base {
- public:
- virtual ~thread_function_base() {}
- virtual void call() = 0;
- };
- template <class T>
- class thread_function : public thread_function_base {
- public:
- thread_function(void (T::*fptr)(), T *obj) : fptr_(fptr), obj_(obj) {}
- virtual void call() { (obj_->*fptr_)(); }
-
- private:
- void (T::*fptr_)();
- T *obj_;
- };
- template <class T, class U>
- class thread_function_arg : public thread_function_base {
- public:
- thread_function_arg(void (T::*fptr)(U arg), T *obj, U arg)
- : fptr_(fptr), obj_(obj), arg_(arg) {}
- virtual void call() { (obj_->*fptr_)(arg_); }
-
- private:
- void (T::*fptr_)(U arg);
- T *obj_;
- U arg_;
- };
- thread_function_base *func_;
- gpr_thd_id thd_;
- bool joined_;
-
- // Disallow copy and assign.
- thread(const thread &);
- void operator=(const thread &);
-};
-
-} // namespace grpc
-
-#endif // GRPCXX_IMPL_THD_NO_CXX11_H
diff --git a/include/grpc++/resource_quota.h b/include/grpc++/resource_quota.h
index db5bc8e7be..75e04d4e2f 100644
--- a/include/grpc++/resource_quota.h
+++ b/include/grpc++/resource_quota.h
@@ -44,7 +44,7 @@ namespace grpc {
/// A ResourceQuota can be attached to a server (via ServerBuilder), or a client
/// channel (via ChannelArguments). gRPC will attempt to keep memory used by
/// all attached entities below the ResourceQuota bound.
-class ResourceQuota GRPC_FINAL {
+class ResourceQuota final {
public:
explicit ResourceQuota(const grpc::string& name);
ResourceQuota();
diff --git a/include/grpc++/server.h b/include/grpc++/server.h
index a6d70c7577..fba9952e6e 100644
--- a/include/grpc++/server.h
+++ b/include/grpc++/server.h
@@ -34,8 +34,10 @@
#ifndef GRPCXX_SERVER_H
#define GRPCXX_SERVER_H
+#include <condition_variable>
#include <list>
#include <memory>
+#include <mutex>
#include <vector>
#include <grpc++/completion_queue.h>
@@ -43,7 +45,6 @@
#include <grpc++/impl/codegen/grpc_library.h>
#include <grpc++/impl/codegen/server_interface.h>
#include <grpc++/impl/rpc_service_method.h>
-#include <grpc++/impl/sync.h>
#include <grpc++/security/server_credentials.h>
#include <grpc++/support/channel_arguments.h>
#include <grpc++/support/config.h>
@@ -64,7 +65,7 @@ class ThreadPoolInterface;
/// Models a gRPC server.
///
/// Servers are configured and started via \a grpc::ServerBuilder.
-class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
+class Server final : public ServerInterface, private GrpcLibraryCodegen {
public:
~Server();
@@ -72,7 +73,7 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
///
/// \warning The server must be either shutting down or some other thread must
/// call \a Shutdown for this function to ever return.
- void Wait() GRPC_OVERRIDE;
+ void Wait() override;
/// Global Callbacks
///
@@ -143,12 +144,11 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
/// Register a service. This call does not take ownership of the service.
/// The service must exist for the lifetime of the Server instance.
- bool RegisterService(const grpc::string* host,
- Service* service) GRPC_OVERRIDE;
+ bool RegisterService(const grpc::string* host, Service* service) override;
/// Register a generic service. This call does not take ownership of the
/// service. The service must exist for the lifetime of the Server instance.
- void RegisterAsyncGenericService(AsyncGenericService* service) GRPC_OVERRIDE;
+ void RegisterAsyncGenericService(AsyncGenericService* service) override;
/// Tries to bind \a server to the given \a addr.
///
@@ -162,7 +162,7 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
///
/// \warning It's an error to call this method on an already started server.
int AddListeningPort(const grpc::string& addr,
- ServerCredentials* creds) GRPC_OVERRIDE;
+ ServerCredentials* creds) override;
/// Start the server.
///
@@ -172,17 +172,17 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
/// \param num_cqs How many completion queues does \a cqs hold.
///
/// \return true on a successful shutdown.
- bool Start(ServerCompletionQueue** cqs, size_t num_cqs) GRPC_OVERRIDE;
+ bool Start(ServerCompletionQueue** cqs, size_t num_cqs) override;
- void PerformOpsOnCall(CallOpSetInterface* ops, Call* call) GRPC_OVERRIDE;
+ void PerformOpsOnCall(CallOpSetInterface* ops, Call* call) override;
- void ShutdownInternal(gpr_timespec deadline) GRPC_OVERRIDE;
+ void ShutdownInternal(gpr_timespec deadline) override;
- int max_receive_message_size() const GRPC_OVERRIDE {
+ int max_receive_message_size() const override {
return max_receive_message_size_;
};
- grpc_server* server() GRPC_OVERRIDE { return server_; };
+ grpc_server* server() override { return server_; };
ServerInitializer* initializer();
@@ -198,12 +198,12 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
std::vector<std::unique_ptr<SyncRequestThreadManager>> sync_req_mgrs_;
// Sever status
- grpc::mutex mu_;
+ std::mutex mu_;
bool started_;
bool shutdown_;
bool shutdown_notified_; // Was notify called on the shutdown_cv_
- grpc::condition_variable shutdown_cv_;
+ std::condition_variable shutdown_cv_;
std::shared_ptr<GlobalCallbacks> global_callbacks_;
diff --git a/include/grpc++/support/byte_buffer.h b/include/grpc++/support/byte_buffer.h
index 06f8969b70..1f317df663 100644
--- a/include/grpc++/support/byte_buffer.h
+++ b/include/grpc++/support/byte_buffer.h
@@ -47,7 +47,7 @@
namespace grpc {
/// A sequence of bytes.
-class ByteBuffer GRPC_FINAL {
+class ByteBuffer final {
public:
/// Constuct an empty buffer.
ByteBuffer() : buffer_(nullptr) {}
diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h
index ba203f85bd..49a3e9461c 100644
--- a/include/grpc++/support/channel_arguments.h
+++ b/include/grpc++/support/channel_arguments.h
@@ -85,6 +85,11 @@ class ChannelArguments {
/// The given buffer pool will be attached to the constructed channel
void SetResourceQuota(const ResourceQuota& resource_quota);
+ /// Set LB policy name.
+ /// Note that if the name resolver returns only balancer addresses, the
+ /// grpclb LB policy will be used, regardless of what is specified here.
+ void SetLoadBalancingPolicyName(const grpc::string& lb_policy_name);
+
// Generic channel argument setters. Only for advanced use cases.
/// Set an integer argument \a value under \a key.
void SetInt(const grpc::string& key, int value);
diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h
index 6ee582275d..3ec0d1af80 100644
--- a/include/grpc++/support/slice.h
+++ b/include/grpc++/support/slice.h
@@ -44,7 +44,7 @@ namespace grpc {
/// A slice represents a contiguous reference counted array of bytes.
/// It is cheap to take references to a slice, and it is cheap to create a
/// slice pointing to a subset of another slice.
-class Slice GRPC_FINAL {
+class Slice final {
public:
/// Construct an empty slice.
Slice();