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 2009/02/01 06:36:10 UTC
svn commit: r739700 -
/incubator/thrift/trunk/compiler/cpp/src/generate/t_html_generator.cc
Author: dreiss
Date: Sun Feb 1 05:36:10 2009
New Revision: 739700
URL: http://svn.apache.org/viewvc?rev=739700&view=rev
Log:
THRIFT-259. html: Generate "extends" link for extended services
Modified:
incubator/thrift/trunk/compiler/cpp/src/generate/t_html_generator.cc
Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_html_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_html_generator.cc?rev=739700&r1=739699&r2=739700&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_html_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_html_generator.cc Sun Feb 1 05:36:10 2009
@@ -299,6 +299,8 @@
f_out_ <<
"div.definition { border: 1px solid gray; margin: 10px; padding: 10px; }" << endl;
f_out_ <<
+ "div.extends { margin: -0.5em 0 1em 5em }" << endl;
+ f_out_ <<
"table { border: 1px solid grey; border-collapse: collapse; }" << endl;
f_out_ <<
"td { border: 1px solid grey; padding: 1px 6px; vertical-align: top; }" << endl;
@@ -367,6 +369,8 @@
f_out_ << "Struct_";
} else if (ttype->is_enum()) {
f_out_ << "Enum_";
+ } else if (ttype->is_service()) {
+ f_out_ << "Svc_";
}
f_out_ << type_name << "\">";
len = type_name.size();
@@ -552,6 +556,12 @@
void t_html_generator::generate_service(t_service* tservice) {
f_out_ << "<h3 id=\"Svc_" << service_name_ << "\">Service: "
<< service_name_ << "</h3>" << endl;
+
+ if (tservice->get_extends()) {
+ f_out_ << "<div class=\"extends\"><em>extends</em> ";
+ print_type(tservice->get_extends());
+ f_out_ << "</div>\n";
+ }
print_doc(tservice);
vector<t_function*> functions = tservice->get_functions();
vector<t_function*>::iterator fn_iter = functions.begin();