You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2008/06/11 02:58:33 UTC
svn commit: r666422 -
/incubator/thrift/trunk/compiler/cpp/src/generate/t_alterl_generator.cc
Author: dreiss
Date: Tue Jun 10 17:58:33 2008
New Revision: 666422
URL: http://svn.apache.org/viewvc?rev=666422&view=rev
Log:
Implement inheritance in the alterl generator
Summary:
- Simply forwards function_info calls through to the base service
Test plan: cpiro will test it?
Modified:
incubator/thrift/trunk/compiler/cpp/src/generate/t_alterl_generator.cc
Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_alterl_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_alterl_generator.cc?rev=666422&r1=666421&r2=666422&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_alterl_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_alterl_generator.cc Tue Jun 10 17:58:33 2008
@@ -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;