From 1d8b75297176d810aa63b5f58f3269b8ddca133a Mon Sep 17 00:00:00 2001 From: David Reiss Date: Wed, 11 Jun 2008 00:58:33 +0000 Subject: [PATCH] Implement inheritance in the alterl generator Summary: - Simply forwards function_info calls through to the base service Test plan: cpiro will test it? git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666422 13f79535-47bb-0310-9956-ffa450edef68 --- compiler/cpp/src/generate/t_alterl_generator.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/compiler/cpp/src/generate/t_alterl_generator.cc b/compiler/cpp/src/generate/t_alterl_generator.cc index f3d661fb..f27670f1 100644 --- a/compiler/cpp/src/generate/t_alterl_generator.cc +++ b/compiler/cpp/src/generate/t_alterl_generator.cc @@ -490,6 +490,15 @@ void t_alterl_generator::generate_service_interface(t_service* tservice) { generate_function_info(tservice, *f_iter); } + // Inheritance - pass unknown functions to base class + if (tservice->get_extends() != NULL) { + indent(f_service_) << "function_info(Function, InfoType) ->" << endl; + indent_up(); + indent(f_service_) << uncapitalize(tservice->get_extends()->get_name()) + << "_thrift:function_info(Function, InfoType);" << endl; + indent_down(); + } + // Dummy function_info so we don't worry about the ;s indent(f_service_) << "function_info(xxx, dummy) -> dummy." << endl; -- 2.17.1