THRIFT-922. cpp: Convert transport classes to use non-virtual calls

Update the thrift transport classes to use non-virtual calls for most
functions.  The correct implementation is determined at compile time via
templates now.  Only the base TTransport class falls back to using
virtual function calls.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005134 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/transport/TSocket.h b/lib/cpp/src/transport/TSocket.h
index f69a9a1..f195438 100644
--- a/lib/cpp/src/transport/TSocket.h
+++ b/lib/cpp/src/transport/TSocket.h
@@ -25,6 +25,7 @@
 #include <netdb.h>
 
 #include "TTransport.h"
+#include "TVirtualTransport.h"
 #include "TServerSocket.h"
 
 namespace apache { namespace thrift { namespace transport {
@@ -33,7 +34,7 @@
  * TCP Socket implementation of the TTransport interface.
  *
  */
-class TSocket : public TTransport {
+class TSocket : public TVirtualTransport<TSocket> {
   /**
    * We allow the TServerSocket acceptImpl() method to access the private
    * members of a socket so that it can access the TSocket(int socket)