Update Thrift CPP libraries to work with new generated source, change underlying buffers to use uint8_t* instead of std::string
Summary: Major overhaul to the CPP libraries.
Reviewed By: aditya
Test Plan: Again, keep an eye out for the unit tests commit
Notes: Initial perf tests show that Thrift is not only more robust than Pillar, but its implementation is actually around 10-20% faster. We can do about 10 RPC function calls with small data payloads in under 2ms. THAT IS FAST. THAT IS THRIFTY.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664714 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/TProcessor.h b/lib/cpp/TProcessor.h
new file mode 100644
index 0000000..f01379d
--- /dev/null
+++ b/lib/cpp/TProcessor.h
@@ -0,0 +1,24 @@
+#ifndef T_PROCESSOR_H
+#define T_PROCESSOR_H
+
+#include <string>
+#include "transport/TTransport.h"
+
+/**
+ * A processor is a generic object that acts upon two streams of data, one
+ * an input and the other an output. The definition of this object is loose,
+ * though the typical case is for some sort of server that either generates
+ * responses to an input stream or forwards data from one pipe onto another.
+ *
+ * @author Mark Slee <mcslee@facebook.com>
+ */
+class TProcessor {
+ public:
+ virtual ~TProcessor() {}
+ virtual bool process(TTransport* in, TTransport *out) = 0;
+ virtual bool process(TTransport* io) { return process(io, io); }
+ protected:
+ TProcessor() {}
+};
+
+#endif