chromium/third_party/grpc/src/src/compiler/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_GENERATOR_HELPERS_H
#define GRPC_INTERNAL_COMPILER_GENERATOR_HELPERS_H

#include <iostream>
#include <map>
#include <sstream>
#include <string>
#include <vector>

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

namespace grpc_generator {

inline bool StripSuffix(std::string* filename, const std::string& suffix) {}

inline bool StripPrefix(std::string* name, const std::string& prefix) {}

inline std::string StripProto(std::string filename) {}

inline std::string StringReplace(std::string str, const std::string& from,
                                 const std::string& to, bool replace_all) {}

inline std::string StringReplace(std::string str, const std::string& from,
                                 const std::string& to) {}

inline std::vector<std::string> tokenize(const std::string& input,
                                         const std::string& delimiters) {}

inline std::string CapitalizeFirstLetter(std::string s) {}

inline std::string LowercaseFirstLetter(std::string s) {}

inline std::string LowerUnderscoreToUpperCamel(std::string str) {}

inline std::string FileNameInUpperCamel(
    const grpc::protobuf::FileDescriptor* file, bool include_package_path) {}

inline std::string FileNameInUpperCamel(
    const grpc::protobuf::FileDescriptor* file) {}

enum MethodType {};

inline MethodType GetMethodType(
    const grpc::protobuf::MethodDescriptor* method) {}

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

enum CommentType {};

// Get all the raw comments and append each line without newline to out.
template <typename DescriptorType>
inline void GetComment(const DescriptorType* desc, CommentType type,
                       std::vector<std::string>* out) {}

// Each raw comment line without newline is appended to out.
// For file level leading and detached leading comments, we return comments
// above syntax line. Return nothing for trailing comments.
template <>
inline void GetComment(const grpc::protobuf::FileDescriptor* desc,
                       CommentType type, std::vector<std::string>* out) {}

// Add prefix and newline to each comment line and concatenate them together.
// Make sure there is a space after the prefix unless the line is empty.
inline std::string GenerateCommentsWithPrefix(
    const std::vector<std::string>& in, const std::string& prefix) {}

template <typename DescriptorType>
inline std::string GetPrefixedComments(const DescriptorType* desc, bool leading,
                                       const std::string& prefix) {}

}  // namespace grpc_generator

#endif  // GRPC_INTERNAL_COMPILER_GENERATOR_HELPERS_H