#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) { … }
}
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) { … }
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>* ) { … }
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>* ) { … }
void PrintHeaderClientMethodCallbackStart(
grpc_generator::Printer* printer,
std::map<std::string, std::string>* ) { … }
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>* ) { … }
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) { … }
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) { … }
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& ) { … }
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& ) { … }
std::string GetMockPrologue(grpc_generator::File* file,
const Parameters& params) { … }
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& ) { … }
}