compiler: Move t_type::generate_fingerprint to a .cc file
Forcing all of the functions under src/parse to be defined in header
files is silly and sometimes painful. Createa a "parse.cc" file for
functions that don't belong in header files. To start, move
generate_fingerprint there, because it requires including md5.h.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1004702 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/parse/parse.cc b/compiler/cpp/src/parse/parse.cc
new file mode 100644
index 0000000..2570c37
--- /dev/null
+++ b/compiler/cpp/src/parse/parse.cc
@@ -0,0 +1,11 @@
+#include "t_type.h"
+
+#include "md5.h"
+
+void t_type::generate_fingerprint() {
+ std::string material = get_fingerprint_material();
+ md5_state_t ctx;
+ md5_init(&ctx);
+ md5_append(&ctx, (md5_byte_t*)(material.data()), (int)material.size());
+ md5_finish(&ctx, (md5_byte_t*)fingerprint_);
+}