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
diff --git a/compiler/cpp/src/generate/t_alterl_generator.cc b/compiler/cpp/src/generate/t_alterl_generator.cc
index f3d661f..f27670f 100644
--- a/compiler/cpp/src/generate/t_alterl_generator.cc
+++ b/compiler/cpp/src/generate/t_alterl_generator.cc
@@ -490,6 +490,15 @@
     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;