Lines Matching refs:vars
72 std::map<grpc::string, grpc::string> vars;
74 vars["l"] = params.use_system_headers ? '<' : '"';
75 vars["r"] = params.use_system_headers ? '>' : '"';
78 vars["l"] += params.grpc_search_path;
80 vars["l"] += '/';
85 vars["h"] = *i;
86 printer->Print(vars, "#include $l$$h$$r$\n");
95 std::map<grpc::string, grpc::string> vars;
97 vars["filename"] = file->filename();
98 vars["filename_identifier"] = FilenameIdentifier(file->filename());
99 vars["filename_base"] = file->filename_without_ext();
100 vars["message_header_ext"] = file->message_header_ext();
102 printer->Print(vars, "// Generated by the gRPC protobuf plugin.\n");
103 printer->Print(vars,
105 printer->Print(vars, "// source: $filename$\n");
106 printer->Print(vars, "#ifndef GRPC_$filename_identifier$__INCLUDED\n");
107 printer->Print(vars, "#define GRPC_$filename_identifier$__INCLUDED\n");
108 printer->Print(vars, "\n");
109 printer->Print(vars, "#include \"$filename_base$$message_header_ext$\"\n");
110 printer->Print(vars, file->additional_headers().c_str());
111 printer->Print(vars, "\n");
122 std::map<grpc::string, grpc::string> vars;
135 printer->Print(vars, "\n");
136 printer->Print(vars, "namespace grpc {\n");
137 printer->Print(vars, "class CompletionQueue;\n");
138 printer->Print(vars, "class Channel;\n");
139 printer->Print(vars, "class RpcService;\n");
140 printer->Print(vars, "class ServerCompletionQueue;\n");
141 printer->Print(vars, "class ServerContext;\n");
142 printer->Print(vars, "} // namespace grpc\n\n");
148 vars["part"] = *part;
149 printer->Print(vars, "namespace $part$ {\n");
151 printer->Print(vars, "\n");
159 std::map<grpc::string, grpc::string> *vars, bool is_public) {
160 (*vars)["Method"] = method->name();
161 (*vars)["Request"] = method->input_type_name();
162 (*vars)["Response"] = method->output_type_name();
167 *vars,
170 printer->Print(*vars,
177 printer->Print(*vars,
185 *vars,
191 *vars,
197 *vars,
203 printer->Print(*vars,
211 *vars,
217 *vars,
223 *vars,
229 printer->Print(*vars,
236 printer->Print(*vars,
242 *vars,
249 *vars,
256 *vars,
266 *vars,
273 *vars,
277 printer->Print(*vars,
284 *vars,
288 *vars,
294 printer->Print(*vars,
298 printer->Print(*vars,
309 std::map<grpc::string, grpc::string> *vars,
311 (*vars)["Method"] = method->name();
312 (*vars)["Request"] = method->input_type_name();
313 (*vars)["Response"] = method->output_type_name();
317 *vars,
321 *vars,
327 printer->Print(*vars,
335 *vars,
340 printer->Print(*vars,
345 printer->Print(*vars,
352 *vars,
359 *vars,
365 *vars,
371 *vars,
378 *vars,
385 *vars,
389 printer->Print(*vars,
395 printer->Print(*vars,
401 printer->Print(*vars,
410 printer->Print(*vars,
416 printer->Print(*vars,
421 *vars,
426 printer->Print(*vars,
431 *vars,
437 *vars,
441 *vars,
450 std::map<grpc::string, grpc::string> *vars) {
451 (*vars)["Method"] = method->name();
452 printer->Print(*vars, "const ::grpc::RpcMethod rpcmethod_$Method$_;\n");
456 std::map<grpc::string, grpc::string> *vars) {
457 (*vars)["Method"] = method->name();
458 (*vars)["Request"] = method->input_type_name();
459 (*vars)["Response"] = method->output_type_name();
461 printer->Print(*vars,
466 printer->Print(*vars,
472 printer->Print(*vars,
478 *vars,
489 std::map<grpc::string, grpc::string> *vars) {
490 (*vars)["Method"] = method->name();
491 (*vars)["Request"] = method->input_type_name();
492 (*vars)["Response"] = method->output_type_name();
493 printer->Print(*vars, "template <class BaseClass>\n");
494 printer->Print(*vars,
501 printer->Print(*vars,
505 printer->Print(*vars,
511 *vars,
520 *vars,
526 printer->Print(*vars,
532 *vars,
542 *vars,
548 printer->Print(*vars,
554 *vars,
564 *vars,
571 *vars,
577 *vars,
587 *vars,
593 printer->Print(*vars,
599 printer->Print(*vars, "};\n");
605 std::map<grpc::string, grpc::string> *vars) {
606 (*vars)["Method"] = method->name();
607 (*vars)["Request"] = method->input_type_name();
608 (*vars)["Response"] = method->output_type_name();
609 printer->Print(*vars, "template <class BaseClass>\n");
610 printer->Print(*vars,
617 printer->Print(*vars,
621 printer->Print(*vars,
627 *vars,
637 *vars,
648 *vars,
659 *vars,
670 printer->Print(*vars, "};\n");
675 std::map<grpc::string, grpc::string> *vars) {
676 (*vars)["Service"] = service->name();
678 printer->Print(*vars,
690 PrintHeaderClientMethodInterfaces(printer, service->method(i).get(), vars, true);
696 PrintHeaderClientMethodInterfaces(printer, service->method(i).get(), vars, false);
706 PrintHeaderClientMethod(printer, service->method(i).get(), vars, true);
713 PrintHeaderClientMethod(printer, service->method(i).get(), vars, false);
716 PrintHeaderClientMethodData(printer, service->method(i).get(), vars);
735 PrintHeaderServerMethodSync(printer, service->method(i).get(), vars);
742 (*vars)["Idx"] = as_string(i);
743 PrintHeaderServerMethodAsync(printer, service->method(i).get(), vars);
749 (*vars)["method_name"] = service->method(i).get()->name();
750 printer->Print(*vars, "WithAsyncMethod_$method_name$<");
760 (*vars)["Idx"] = as_string(i);
761 PrintHeaderServerMethodGeneric(printer, service->method(i).get(), vars);
774 std::map<grpc::string, grpc::string> vars;
777 vars["Package"] = file->package();
779 vars["Package"].append(".");
783 vars["services_namespace"] = params.services_namespace;
784 printer->Print(vars, "\nnamespace $services_namespace$ {\n\n");
788 PrintHeaderService(printer.get(), file->service(i).get(), &vars);
793 printer->Print(vars, "} // namespace $services_namespace$\n\n");
804 std::map<grpc::string, grpc::string> vars;
806 vars["filename"] = file->filename();
807 vars["filename_identifier"] = FilenameIdentifier(file->filename());
813 vars["part"] = *part;
814 printer->Print(vars, "} // namespace $part$\n");
816 printer->Print(vars, "\n");
819 printer->Print(vars, "\n");
820 printer->Print(vars, "#endif // GRPC_$filename_identifier$__INCLUDED\n");
830 std::map<grpc::string, grpc::string> vars;
832 vars["filename"] = file->filename();
833 vars["filename_base"] = file->filename_without_ext();
834 vars["message_header_ext"] = file->message_header_ext();
835 vars["service_header_ext"] = file->service_header_ext();
837 printer->Print(vars, "// Generated by the gRPC protobuf plugin.\n");
838 printer->Print(vars,
840 printer->Print(vars, "// source: $filename$\n\n");
841 printer->Print(vars, "#include \"$filename_base$$message_header_ext$\"\n");
842 printer->Print(vars, "#include \"$filename_base$$service_header_ext$\"\n");
854 std::map<grpc::string, grpc::string> vars;
874 vars["part"] = *part;
875 printer->Print(vars, "namespace $part$ {\n");
879 printer->Print(vars, "\n");
886 std::map<grpc::string, grpc::string> *vars) {
887 (*vars)["Method"] = method->name();
888 (*vars)["Request"] = method->input_type_name();
889 (*vars)["Response"] = method->output_type_name();
891 printer->Print(*vars,
895 printer->Print(*vars,
901 *vars,
906 printer->Print(*vars,
914 printer->Print(*vars,
918 printer->Print(*vars,
924 printer->Print(*vars,
929 printer->Print(*vars,
937 *vars,
941 printer->Print(*vars,
947 printer->Print(*vars,
952 printer->Print(*vars,
960 *vars,
963 printer->Print(*vars,
971 *vars,
975 printer->Print(*vars,
987 std::map<grpc::string, grpc::string> *vars) {
988 (*vars)["Method"] = method->name();
989 (*vars)["Request"] = method->input_type_name();
990 (*vars)["Response"] = method->output_type_name();
992 printer->Print(*vars,
1004 printer->Print(*vars,
1017 printer->Print(*vars,
1030 printer->Print(*vars,
1046 std::map<grpc::string, grpc::string> *vars) {
1047 (*vars)["Service"] = service->name();
1049 printer->Print(*vars,
1052 (*vars)["Method"] = service->method(i).get()->name();
1053 printer->Print(*vars, " \"/$Package$$Service$/$Method$\",\n");
1055 printer->Print(*vars, "};\n\n");
1057 printer->Print(*vars,
1065 printer->Print(*vars,
1072 (*vars)["Method"] = method->name();
1073 (*vars)["Idx"] = as_string(i);
1075 (*vars)["StreamingType"] = "NORMAL_RPC";
1077 (*vars)["StreamingType"] = "CLIENT_STREAMING";
1079 (*vars)["StreamingType"] = "SERVER_STREAMING";
1081 (*vars)["StreamingType"] = "BIDI_STREAMING";
1083 printer->Print(*vars,
1094 (*vars)["Idx"] = as_string(i);
1095 PrintSourceClientMethod(printer, service->method(i).get(), vars);
1098 printer->Print(*vars, "$ns$$Service$::Service::Service() {\n");
1100 printer->Print(*vars, "(void)$prefix$$Service$_method_names;\n");
1103 (*vars)["Idx"] = as_string(i);
1104 (*vars)["Method"] = method->name();
1105 (*vars)["Request"] = method->input_type_name();
1106 (*vars)["Response"] = method->output_type_name();
1109 *vars,
1119 *vars,
1128 *vars,
1137 *vars,
1147 printer->Print(*vars, "}\n\n");
1148 printer->Print(*vars,
1152 (*vars)["Idx"] = as_string(i);
1153 PrintSourceServerMethod(printer, service->method(i).get(), vars);
1163 std::map<grpc::string, grpc::string> vars;
1166 vars["Package"] = file->package();
1168 vars["Package"].append(".");
1171 vars["ns"] = params.services_namespace + "::";
1172 vars["prefix"] = params.services_namespace;
1174 vars["ns"] = "";
1175 vars["prefix"] = "";
1179 PrintSourceService(printer.get(), file->service(i).get(), &vars);