chromium/third_party/grpc/src/src/compiler/csharp_generator.cc

/*
 *
 * Copyright 2015 gRPC authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

#include "src/compiler/csharp_generator.h"

#include <cctype>
#include <map>
#include <sstream>
#include <vector>

#include "src/compiler/config.h"
#include "src/compiler/csharp_generator_helpers.h"

Descriptor;
FileDescriptor;
MethodDescriptor;
ServiceDescriptor;
Printer;
StringOutputStream;
StringReplace;
vector;

namespace grpc_csharp_generator {
namespace {

// This function is a massaged version of
// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc
// Currently, we cannot easily reuse the functionality as
// google/protobuf/compiler/csharp/csharp_doc_comment.h is not a public header.
// TODO(jtattermusch): reuse the functionality from google/protobuf.
bool GenerateDocCommentBodyImpl(grpc::protobuf::io::Printer* printer,
                                grpc::protobuf::SourceLocation location) {}

void GenerateGeneratedCodeAttribute(grpc::protobuf::io::Printer* printer) {}

template <typename DescriptorType>
bool GenerateDocCommentBody(grpc::protobuf::io::Printer* printer,
                            const DescriptorType* descriptor) {}

void GenerateDocCommentServerMethod(grpc::protobuf::io::Printer* printer,
                                    const MethodDescriptor* method) {}

void GenerateDocCommentClientMethod(grpc::protobuf::io::Printer* printer,
                                    const MethodDescriptor* method,
                                    bool is_sync, bool use_call_options) {}

std::string GetServiceClassName(const ServiceDescriptor* service) {}

std::string GetClientClassName(const ServiceDescriptor* service) {}

std::string GetServerClassName(const ServiceDescriptor* service) {}

std::string GetCSharpMethodType(const MethodDescriptor* method) {}

std::string GetCSharpServerMethodType(const MethodDescriptor* method) {}

std::string GetServiceNameFieldName() {}

std::string GetMarshallerFieldName(const Descriptor* message) {}

std::string GetMethodFieldName(const MethodDescriptor* method) {}

std::string GetMethodRequestParamMaybe(const MethodDescriptor* method,
                                       bool invocation_param = false) {}

std::string GetAccessLevel(bool internal_access) {}

std::string GetMethodReturnTypeClient(const MethodDescriptor* method) {}

std::string GetMethodRequestParamServer(const MethodDescriptor* method) {}

std::string GetMethodReturnTypeServer(const MethodDescriptor* method) {}

std::string GetMethodResponseStreamMaybe(const MethodDescriptor* method) {}

// Gets vector of all messages used as input or output types.
std::vector<const Descriptor*> GetUsedMessages(
    const ServiceDescriptor* service) {}

void GenerateMarshallerFields(Printer* out, const ServiceDescriptor* service) {}

void GenerateStaticMethodField(Printer* out, const MethodDescriptor* method) {}

void GenerateServiceDescriptorProperty(Printer* out,
                                       const ServiceDescriptor* service) {}

void GenerateServerClass(Printer* out, const ServiceDescriptor* service) {}

void GenerateClientStub(Printer* out, const ServiceDescriptor* service) {}

void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor* service) {}

void GenerateBindServiceWithBinderMethod(Printer* out,
                                         const ServiceDescriptor* service) {}

void GenerateService(Printer* out, const ServiceDescriptor* service,
                     bool generate_client, bool generate_server,
                     bool internal_access) {}

}  // anonymous namespace

std::string GetServices(const FileDescriptor* file, bool generate_client,
                        bool generate_server, bool internal_access) {}

}  // namespace grpc_csharp_generator