aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/config.h
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2016-04-25 14:51:05 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2016-04-26 18:01:35 -0700
commita967ee567e24c998b45560ba3e32032d7791649b (patch)
treef125f9c30eaf1279702a69b5a01021afe306eed5 /src/compiler/config.h
parent44f7c54847d4f733c681c87952afb95be8c54eb6 (diff)
support custom parsegeneratorparameter
Diffstat (limited to 'src/compiler/config.h')
-rw-r--r--src/compiler/config.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/config.h b/src/compiler/config.h
index fea976c318..a31dc24f6d 100644
--- a/src/compiler/config.h
+++ b/src/compiler/config.h
@@ -68,6 +68,11 @@
#define GRPC_CUSTOM_PLUGINMAIN ::google::protobuf::compiler::PluginMain
#endif
+#ifndef GRPC_CUSTOM_PARSEGENERATORPARAMETER
+#include <google/protobuf/compiler/code_generator.h>
+#define GRPC_CUSTOM_PARSEGENERATORPARAMETER ::google::protobuf::compiler::ParseGeneratorParameter
+#endif
+
namespace grpc {
namespace protobuf {
typedef GRPC_CUSTOM_DESCRIPTOR Descriptor;
@@ -81,6 +86,11 @@ static inline int PluginMain(int argc, char* argv[],
const CodeGenerator* generator) {
return GRPC_CUSTOM_PLUGINMAIN(argc, argv, generator);
}
+static inline void ParseGeneratorParameter(const string& parameter,
+ std::vector<std::pair<string, string> >* options) {
+ GRPC_CUSTOM_PARSEGENERATORPARAMETER(parameter, options);
+}
+
} // namespace compiler
namespace io {
typedef GRPC_CUSTOM_PRINTER Printer;