chromium/third_party/flatbuffers/src/grpc/src/compiler/swift_generator.cc

/*
 * Copyright 2020 Google Inc. All rights reserved.
 *
 * 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.
 */

/*
 * NOTE: The following implementation is a translation for the Swift-grpc
 * generator since flatbuffers doesnt allow plugins for now. if an issue arises
 * please open an issue in the flatbuffers repository. This file should always
 * be maintained according to the Swift-grpc repository
 */
#include <map>
#include <sstream>

#include "flatbuffers/util.h"
#include "src/compiler/schema_interface.h"
#include "src/compiler/swift_generator.h"

namespace grpc_swift_generator {
namespace {

static std::string WrapInNameSpace(const std::vector<std::string> &components,
                            const grpc::string &name) {}

static grpc::string GenerateMessage(const std::vector<std::string> &components,
                             const grpc::string &name) {}

// MARK: - Client

static void GenerateClientFuncName(const grpc_generator::Method *method,
                            grpc_generator::Printer *printer,
                            std::map<grpc::string, grpc::string> *dictonary) {}

static void GenerateClientFuncBody(const grpc_generator::Method *method,
                            grpc_generator::Printer *printer,
                            std::map<grpc::string, grpc::string> *dictonary) {}

void GenerateClientProtocol(const grpc_generator::Service *service,
                            grpc_generator::Printer *printer,
                            std::map<grpc::string, grpc::string> *dictonary) {}

void GenerateClientClass(grpc_generator::Printer *printer,
                         std::map<grpc::string, grpc::string> *dictonary) {}

// MARK: - Server

grpc::string GenerateServerFuncName(const grpc_generator::Method *method) {}

grpc::string GenerateServerExtensionBody(const grpc_generator::Method *method) {}

void GenerateServerProtocol(const grpc_generator::Service *service,
                            grpc_generator::Printer *printer,
                            std::map<grpc::string, grpc::string> *dictonary) {}
} // namespace

grpc::string Generate(grpc_generator::File *file,
                      const grpc_generator::Service *service) {}

grpc::string GenerateHeader() {}
}  // namespace grpc_swift_generator