chromium/third_party/grpc/src/src/compiler/cpp_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/cpp_generator.h"

#include <map>
#include <sstream>

namespace grpc_cpp_generator {
namespace {

template <class T>
std::string as_string(T x) {}

inline bool ClientOnlyStreaming(const grpc_generator::Method* method) {}

inline bool ServerOnlyStreaming(const grpc_generator::Method* method) {}

std::string FilenameIdentifier(const std::string& filename) {}

}  // namespace

template <class T, size_t N>
T* array_end(T (&array)[N]) {}

void PrintIncludes(grpc_generator::Printer* printer,
                   const std::vector<std::string>& headers,
                   bool use_system_headers, const std::string& search_path) {}

std::string GetHeaderPrologue(grpc_generator::File* file,
                              const Parameters& params) {}

// Convert from "a/b/c.proto" to "#include \"a/b/c$message_header_ext$\"\n"
std::string ImportInludeFromProtoName(const std::string& proto_name) {}

std::string GetHeaderIncludes(grpc_generator::File* file,
                              const Parameters& params) {}

void PrintHeaderClientMethodInterfaces(grpc_generator::Printer* printer,
                                       const grpc_generator::Method* method,
                                       std::map<std::string, std::string>* vars,
                                       bool is_public) {}

void PrintHeaderClientMethod(grpc_generator::Printer* printer,
                             const grpc_generator::Method* method,
                             std::map<std::string, std::string>* vars,
                             bool is_public) {}

void PrintHeaderClientMethodCallbackInterfacesStart(
    grpc_generator::Printer* printer,
    std::map<std::string, std::string>* /*vars*/) {}

void PrintHeaderClientMethodCallbackInterfaces(
    grpc_generator::Printer* printer, const grpc_generator::Method* method,
    std::map<std::string, std::string>* vars) {}

void PrintHeaderClientMethodCallbackInterfacesEnd(
    grpc_generator::Printer* printer,
    std::map<std::string, std::string>* /*vars*/) {}

void PrintHeaderClientMethodCallbackStart(
    grpc_generator::Printer* printer,
    std::map<std::string, std::string>* /*vars*/) {}

void PrintHeaderClientMethodCallback(grpc_generator::Printer* printer,
                                     const grpc_generator::Method* method,
                                     std::map<std::string, std::string>* vars) {}

void PrintHeaderClientMethodCallbackEnd(
    grpc_generator::Printer* printer,
    std::map<std::string, std::string>* /*vars*/) {}

void PrintHeaderClientMethodData(grpc_generator::Printer* printer,
                                 const grpc_generator::Method* method,
                                 std::map<std::string, std::string>* vars) {}

void PrintHeaderServerMethodSync(grpc_generator::Printer* printer,
                                 const grpc_generator::Method* method,
                                 std::map<std::string, std::string>* vars) {}

// Helper generator. Disables the sync API for Request and Response, then adds
// in an async API for RealRequest and RealResponse types. This is to be used
// to generate async and raw async APIs.
void PrintHeaderServerAsyncMethodsHelper(
    grpc_generator::Printer* printer, const grpc_generator::Method* method,
    std::map<std::string, std::string>* vars) {}

void PrintHeaderServerMethodAsync(grpc_generator::Printer* printer,
                                  const grpc_generator::Method* method,
                                  std::map<std::string, std::string>* vars) {}

// Helper generator. Disables the sync API for Request and Response, then adds
// in a callback API for RealRequest and RealResponse types. This is to be used
// to generate callback and raw callback APIs.
void PrintHeaderServerCallbackMethodsHelper(
    grpc_generator::Printer* printer, const grpc_generator::Method* method,
    std::map<std::string, std::string>* vars) {}

void PrintHeaderServerMethodCallback(grpc_generator::Printer* printer,
                                     const grpc_generator::Method* method,
                                     std::map<std::string, std::string>* vars) {}

void PrintHeaderServerMethodRawCallback(
    grpc_generator::Printer* printer, const grpc_generator::Method* method,
    std::map<std::string, std::string>* vars) {}

void PrintHeaderServerMethodStreamedUnary(
    grpc_generator::Printer* printer, const grpc_generator::Method* method,
    std::map<std::string, std::string>* vars) {}

void PrintHeaderServerMethodSplitStreaming(
    grpc_generator::Printer* printer, const grpc_generator::Method* method,
    std::map<std::string, std::string>* vars) {}

void PrintHeaderServerMethodGeneric(grpc_generator::Printer* printer,
                                    const grpc_generator::Method* method,
                                    std::map<std::string, std::string>* vars) {}

void PrintHeaderServerMethodRaw(grpc_generator::Printer* printer,
                                const grpc_generator::Method* method,
                                std::map<std::string, std::string>* vars) {}

void PrintHeaderService(grpc_generator::Printer* printer,
                        const grpc_generator::Service* service,
                        std::map<std::string, std::string>* vars) {}

std::string GetHeaderServices(grpc_generator::File* file,
                              const Parameters& params) {}

std::string GetHeaderEpilogue(grpc_generator::File* file,
                              const Parameters& /*params*/) {}

std::string GetSourcePrologue(grpc_generator::File* file,
                              const Parameters& params) {}

std::string GetSourceIncludes(grpc_generator::File* file,
                              const Parameters& params) {}

void PrintSourceClientMethod(grpc_generator::Printer* printer,
                             const grpc_generator::Method* method,
                             std::map<std::string, std::string>* vars) {}

void PrintSourceServerMethod(grpc_generator::Printer* printer,
                             const grpc_generator::Method* method,
                             std::map<std::string, std::string>* vars) {}

void PrintSourceService(grpc_generator::Printer* printer,
                        const grpc_generator::Service* service,
                        std::map<std::string, std::string>* vars) {}

std::string GetSourceServices(grpc_generator::File* file,
                              const Parameters& params) {}

std::string GetSourceEpilogue(grpc_generator::File* file,
                              const Parameters& /*params*/) {}

// TODO(mmukhi): Make sure we need parameters or not.
std::string GetMockPrologue(grpc_generator::File* file,
                            const Parameters& params) {}

// TODO(mmukhi): Add client-stream and completion-queue headers.
std::string GetMockIncludes(grpc_generator::File* file,
                            const Parameters& params) {}

void PrintMockClientMethods(grpc_generator::Printer* printer,
                            const grpc_generator::Method* method,
                            std::map<std::string, std::string>* vars) {}

void PrintMockService(grpc_generator::Printer* printer,
                      const grpc_generator::Service* service,
                      std::map<std::string, std::string>* vars) {}

std::string GetMockServices(grpc_generator::File* file,
                            const Parameters& params) {}

std::string GetMockEpilogue(grpc_generator::File* file,
                            const Parameters& /*params*/) {}

}  // namespace grpc_cpp_generator