Get rid of all the using namespace and using boost:: declarations in Thrift header files
Summary: To remove upstream dependencies. Still keeping some specific using directives around.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665047 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/server/TNonblockingServer.h b/lib/cpp/src/server/TNonblockingServer.h
index abfd5fa..e4f8346 100644
--- a/lib/cpp/src/server/TNonblockingServer.h
+++ b/lib/cpp/src/server/TNonblockingServer.h
@@ -15,7 +15,8 @@
namespace facebook { namespace thrift { namespace server {
-using boost::shared_ptr;
+using facebook::thrift::transport::TMemoryBuffer;
+using facebook::thrift::protocol::TProtocol;
// Forward declaration of class
class TConnection;
@@ -56,31 +57,31 @@
void handleEvent(int fd, short which);
public:
- TNonblockingServer(shared_ptr<TProcessor> processor,
+ TNonblockingServer(boost::shared_ptr<TProcessor> processor,
int port) :
TServer(processor),
serverSocket_(0),
port_(port),
frameResponses_(true) {}
- TNonblockingServer(shared_ptr<TProcessor> processor,
- shared_ptr<TProtocolFactory> protocolFactory,
+ TNonblockingServer(boost::shared_ptr<TProcessor> processor,
+ boost::shared_ptr<TProtocolFactory> protocolFactory,
int port) :
TServer(processor),
serverSocket_(0),
port_(port),
frameResponses_(true) {
- setInputTransportFactory(shared_ptr<TTransportFactory>(new TTransportFactory()));
- setOutputTransportFactory(shared_ptr<TTransportFactory>(new TTransportFactory()));
+ setInputTransportFactory(boost::shared_ptr<TTransportFactory>(new TTransportFactory()));
+ setOutputTransportFactory(boost::shared_ptr<TTransportFactory>(new TTransportFactory()));
setInputProtocolFactory(protocolFactory);
setOutputProtocolFactory(protocolFactory);
}
- TNonblockingServer(shared_ptr<TProcessor> processor,
- shared_ptr<TTransportFactory> inputTransportFactory,
- shared_ptr<TTransportFactory> outputTransportFactory,
- shared_ptr<TProtocolFactory> inputProtocolFactory,
- shared_ptr<TProtocolFactory> outputProtocolFactory,
+ TNonblockingServer(boost::shared_ptr<TProcessor> processor,
+ boost::shared_ptr<TTransportFactory> inputTransportFactory,
+ boost::shared_ptr<TTransportFactory> outputTransportFactory,
+ boost::shared_ptr<TProtocolFactory> inputProtocolFactory,
+ boost::shared_ptr<TProtocolFactory> outputProtocolFactory,
int port) :
TServer(processor),
serverSocket_(0),
@@ -186,20 +187,20 @@
int32_t frameSize_;
// Transport to read from
- shared_ptr<TMemoryBuffer> inputTransport_;
+ boost::shared_ptr<TMemoryBuffer> inputTransport_;
// Transport that processor writes to
- shared_ptr<TMemoryBuffer> outputTransport_;
+ boost::shared_ptr<TMemoryBuffer> outputTransport_;
// extra transport generated by transport factory (e.g. BufferedRouterTransport)
- shared_ptr<TTransport> factoryInputTransport_;
- shared_ptr<TTransport> factoryOutputTransport_;
+ boost::shared_ptr<TTransport> factoryInputTransport_;
+ boost::shared_ptr<TTransport> factoryOutputTransport_;
// Protocol decoder
- shared_ptr<TProtocol> inputProtocol_;
+ boost::shared_ptr<TProtocol> inputProtocol_;
// Protocol encoder
- shared_ptr<TProtocol> outputProtocol_;
+ boost::shared_ptr<TProtocol> outputProtocol_;
// Go into read mode
void setRead() {
@@ -233,8 +234,8 @@
// Allocate input and output tranpsorts
// these only need to be allocated once per TConnection (they don't need to be
// reallocated on init() call)
- inputTransport_ = shared_ptr<TMemoryBuffer>(new TMemoryBuffer(readBuffer_, readBufferSize_));
- outputTransport_ = shared_ptr<TMemoryBuffer>(new TMemoryBuffer());
+ inputTransport_ = boost::shared_ptr<TMemoryBuffer>(new TMemoryBuffer(readBuffer_, readBufferSize_));
+ outputTransport_ = boost::shared_ptr<TMemoryBuffer>(new TMemoryBuffer());
init(socket, eventFlags, s);
}