chromium/third_party/grpc/src/src/compiler/python_generator_helpers.h

/*
 *
 * 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.
 *
 */

#ifndef GRPC_INTERNAL_COMPILER_PYTHON_GENERATOR_HELPERS_H
#define GRPC_INTERNAL_COMPILER_PYTHON_GENERATOR_HELPERS_H

#include <cstring>
#include <fstream>
#include <iostream>
#include <vector>

#include "src/compiler/config.h"
#include "src/compiler/generator_helpers.h"
#include "src/compiler/python_generator.h"
#include "src/compiler/python_private_generator.h"

Descriptor;
FileDescriptor;
MethodDescriptor;
ServiceDescriptor;
GeneratorContext;
CodedOutputStream;
Printer;
StringOutputStream;
ZeroCopyOutputStream;
StringReplace;
StripProto;
vector;

namespace grpc_python_generator {

namespace {

DescriptorVector;
StringVector;

static std::string StripModulePrefixes(
    const std::string& raw_module_name,
    const std::vector<std::string>& prefixes_to_filter) {}

// TODO(https://github.com/protocolbuffers/protobuf/issues/888):
// Export `ModuleName` from protobuf's
// `src/google/protobuf/compiler/python/python_generator.cc` file.
std::string ModuleName(const std::string& filename,
                       const std::string& import_prefix,
                       const std::vector<std::string>& prefixes_to_filter) {}

// TODO(https://github.com/protocolbuffers/protobuf/issues/888):
// Export `ModuleAlias` from protobuf's
// `src/google/protobuf/compiler/python/python_generator.cc` file.
std::string ModuleAlias(const std::string& filename,
                        const std::string& import_prefix,
                        const std::vector<std::string>& prefixes_to_filter) {}

bool GetModuleAndMessagePath(
    const Descriptor* type, std::string* out, std::string generator_file_name,
    bool generate_in_pb2_grpc, std::string& import_prefix,
    const std::vector<std::string>& prefixes_to_filter) {}

template <typename DescriptorType>
StringVector get_all_comments(const DescriptorType* descriptor) {}

inline void Split(const std::string& s, char delim,
                  std::vector<std::string>* append_to) {}

}  // namespace

}  // namespace grpc_python_generator

#endif  // GRPC_INTERNAL_COMPILER_PYTHON_GENERATOR_HELPERS_H