You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2011/04/12 21:08:21 UTC
svn commit: r1091546 - in /thrift/trunk/compiler/cpp/src/generate:
t_erl_generator.cc t_go_generator.cc t_hs_generator.cc t_js_generator.cc
t_ocaml_generator.cc t_oop_generator.h t_perl_generator.cc
t_py_generator.cc t_rb_generator.cc t_st_generator.cc
Author: roger
Date: Tue Apr 12 19:08:21 2011
New Revision: 1091546
URL: http://svn.apache.org/viewvc?rev=1091546&view=rev
Log:
THRIFT-1137 add Compiler Version Info to generated files
Modified:
thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc
thrift/trunk/compiler/cpp/src/generate/t_go_generator.cc
thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc
thrift/trunk/compiler/cpp/src/generate/t_js_generator.cc
thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc
thrift/trunk/compiler/cpp/src/generate/t_oop_generator.h
thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc
thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc
thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc
thrift/trunk/compiler/cpp/src/generate/t_st_generator.cc
Modified: thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc?rev=1091546&r1=1091545&r2=1091546&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc Tue Apr 12 19:08:21 2011
@@ -28,6 +28,7 @@
#include <sstream>
#include "t_generator.h"
#include "platform.h"
+#include "version.h"
using namespace std;
@@ -252,7 +253,7 @@ string t_erl_generator::render_includes(
string t_erl_generator::erl_autogen_comment() {
return
std::string("%%\n") +
- "%% Autogenerated by Thrift\n" +
+ "%% Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" +
"%%\n" +
"%% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" +
"%%\n";
Modified: thrift/trunk/compiler/cpp/src/generate/t_go_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_go_generator.cc?rev=1091546&r1=1091545&r2=1091546&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_go_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_go_generator.cc Tue Apr 12 19:08:21 2011
@@ -29,6 +29,8 @@
#include <algorithm>
#include "t_generator.h"
#include "platform.h"
+#include "version.h"
+
using namespace std;
@@ -374,7 +376,8 @@ string t_go_generator::render_fastbinary
*/
string t_go_generator::go_autogen_comment() {
return
- "/* Autogenerated by Thrift\n"
+ std::string() +
+ "/* Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n"
" *\n"
" * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n"
" */\n";
Modified: thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc?rev=1091546&r1=1091545&r2=1091546&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc Tue Apr 12 19:08:21 2011
@@ -29,6 +29,7 @@
#include "t_oop_generator.h"
#include "platform.h"
+#include "version.h"
using namespace std;
@@ -222,7 +223,7 @@ string t_hs_generator::hs_language_pragm
*/
string t_hs_generator::hs_autogen_comment() {
return string("-----------------------------------------------------------------\n") +
- "-- Autogenerated by Thrift --\n" +
+ "-- Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ") --\n" +
"-- --\n" +
"-- DO NOT EDIT UNLESS YOU ARE SURE YOU KNOW WHAT YOU ARE DOING --\n" +
"-----------------------------------------------------------------\n";
Modified: thrift/trunk/compiler/cpp/src/generate/t_js_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_js_generator.cc?rev=1091546&r1=1091545&r2=1091546&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_js_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_js_generator.cc Tue Apr 12 19:08:21 2011
@@ -27,6 +27,8 @@
#include <sys/stat.h>
#include <sstream>
#include "platform.h"
+#include "version.h"
+
using namespace std;
@@ -169,7 +171,7 @@ class t_js_generator : public t_oop_gene
std::string autogen_comment() {
return
std::string("//\n") +
- "// Autogenerated by Thrift\n" +
+ "// Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" +
"//\n" +
"// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" +
"//\n";
Modified: thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc?rev=1091546&r1=1091545&r2=1091546&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc Tue Apr 12 19:08:21 2011
@@ -28,6 +28,8 @@
#include <sstream>
#include "t_oop_generator.h"
#include "platform.h"
+#include "version.h"
+
using namespace std;
@@ -267,7 +269,7 @@ void t_ocaml_generator::init_generator()
string t_ocaml_generator::ocaml_autogen_comment() {
return
std::string("(*\n") +
- " Autogenerated by Thrift\n" +
+ " Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" +
"\n" +
" DO NOT EDIT UNLESS YOU ARE SURE YOU KNOW WHAT YOU ARE DOING\n" +
"*)\n";
Modified: thrift/trunk/compiler/cpp/src/generate/t_oop_generator.h
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_oop_generator.h?rev=1091546&r1=1091545&r2=1091546&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_oop_generator.h (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_oop_generator.h Tue Apr 12 19:08:21 2011
@@ -25,6 +25,7 @@
#include "globals.h"
#include "t_generator.h"
+#include "version.h"
#include <algorithm>
@@ -66,7 +67,7 @@ class t_oop_generator : public t_generat
virtual std::string autogen_comment() {
return
std::string("/**\n") +
- " * Autogenerated by Thrift\n" +
+ " * Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" +
" *\n" +
" * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" +
" */\n";
Modified: thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc?rev=1091546&r1=1091545&r2=1091546&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc Tue Apr 12 19:08:21 2011
@@ -28,6 +28,8 @@
#include <sstream>
#include "t_oop_generator.h"
#include "platform.h"
+#include "version.h"
+
using namespace std;
@@ -158,7 +160,7 @@ class t_perl_generator : public t_oop_ge
std::string autogen_comment() {
return
std::string("#\n") +
- "# Autogenerated by Thrift\n" +
+ "# Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" +
"#\n" +
"# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" +
"#\n";
Modified: thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc?rev=1091546&r1=1091545&r2=1091546&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc Tue Apr 12 19:08:21 2011
@@ -29,6 +29,8 @@
#include <algorithm>
#include "t_generator.h"
#include "platform.h"
+#include "version.h"
+
using namespace std;
@@ -338,7 +340,7 @@ string t_py_generator::render_fastbinary
string t_py_generator::py_autogen_comment() {
return
std::string("#\n") +
- "# Autogenerated by Thrift\n" +
+ "# Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" +
"#\n" +
"# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" +
"#\n";
Modified: thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc?rev=1091546&r1=1091545&r2=1091546&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc Tue Apr 12 19:08:21 2011
@@ -34,6 +34,8 @@
#include "t_oop_generator.h"
#include "platform.h"
+#include "version.h"
+
using namespace std;
@@ -262,7 +264,7 @@ string t_rb_generator::render_includes()
string t_rb_generator::rb_autogen_comment() {
return
std::string("#\n") +
- "# Autogenerated by Thrift\n" +
+ "# Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" +
"#\n" +
"# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" +
"#\n";
Modified: thrift/trunk/compiler/cpp/src/generate/t_st_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_st_generator.cc?rev=1091546&r1=1091545&r2=1091546&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_st_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_st_generator.cc Tue Apr 12 19:08:21 2011
@@ -34,6 +34,8 @@
#include "platform.h"
#include "t_oop_generator.h"
+#include "version.h"
+
using namespace std;
@@ -205,7 +207,7 @@ string t_st_generator::client_class_name
string t_st_generator::st_autogen_comment() {
return
std::string("'") +
- "Autogenerated by Thrift\n" +
+ "Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" +
"\n" +
"DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" +
"'!\n";