37 #ifndef PROTOC_SERVICEGENERATOR_H_
38 #define PROTOC_SERVICEGENERATOR_H_
40 #include <google/protobuf/stubs/common.h>
41 #include <google/protobuf/io/printer.h>
42 #include <google/protobuf/descriptor.h>
49 using google::protobuf::ServiceDescriptor;
50 using google::protobuf::io::Printer;
57 Options() : safe_boundary_check(
false) {
59 string dllexport_decl;
60 bool safe_boundary_check;
72 void GenerateDeclarations(Printer* printer);
78 void GenerateDescriptorInitializer(Printer* printer,
int index);
81 void GenerateImplementation(Printer* printer);
84 enum RequestOrResponse { REQUEST, RESPONSE };
85 enum VirtualOrNon { VIRTUAL, NON_VIRTUAL };
90 void GenerateInterface(Printer* printer);
93 void GenerateStubDefinition(Printer* printer);
96 void GenerateMethodSignatures(VirtualOrNon virtual_or_non,
103 void GenerateNotImplementedMethods(Printer* printer);
106 void GenerateCallMethod(Printer* printer);
109 void GenerateGetPrototype(RequestOrResponse which, Printer* printer);
112 void GenerateStubMethods(Printer* printer);
114 const ServiceDescriptor* descriptor_;
115 std::map<string, string> vars_;
117 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator);
121 #endif // PROTOC_SERVICEGENERATOR_H_