Rev 2 of Thrift, the Pillar successor

Summary: End-to-end communications and serialization in C++ is working

Reviewed By: aditya

Test Plan: See the new top-level test/ folder. It vaguely resembles a unit test, though it could be more automated.

Revert Plan: Revertible

Notes: Still a LOT of optimization work to be done on the generated C++ code, which should be using dynamic memory in a number of places. Next major task is writing the PHP/Java/Python generators.




git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664712 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/TDispatcher.h b/lib/cpp/TDispatcher.h
new file mode 100644
index 0000000..f8ff847
--- /dev/null
+++ b/lib/cpp/TDispatcher.h
@@ -0,0 +1,22 @@
+#ifndef T_DISPATCHER_H
+#define T_DISPATCHER_H
+
+#include <string>
+
+/**
+ * A dispatcher is a generic object that accepts an input buffer and returns
+ * a buffer. It can be used in a variety of ways, i.e. as a client that
+ * sends data over the network and returns a response, or as a server that
+ * reads an input and returns an output.
+ *
+ * @author Mark Slee <mcslee@facebook.com>
+ */
+class TDispatcher {
+ public:
+  virtual ~TDispatcher() {};
+  virtual std::string dispatch(const std::string& s) = 0;
+ protected:
+  TDispatcher() {}
+};
+
+#endif