THRIFT-270: change cpp namespaces from facebook::thrift to apache::thrift

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739644 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/Benchmark.cpp b/test/Benchmark.cpp
index af118ee..0f79976 100644
--- a/test/Benchmark.cpp
+++ b/test/Benchmark.cpp
@@ -32,8 +32,8 @@
 int main() {
   using namespace std;
   using namespace thrift::test::debug;
-  using namespace facebook::thrift::transport;
-  using namespace facebook::thrift::protocol;
+  using namespace apache::thrift::transport;
+  using namespace apache::thrift::protocol;
   using namespace boost;
 
   OneOfEach ooe;
@@ -79,7 +79,7 @@
       TBinaryProtocol prot(buf2);
       ooe2.read(&prot);
 
-      //cout << facebook::thrift::ThriftDebugString(ooe2) << endl << endl;
+      //cout << apache::thrift::ThriftDebugString(ooe2) << endl << endl;
     }
     cout << " Read: " << num / (1000 * timer.frame()) << " kHz" << endl;
   }
diff --git a/test/DebugProtoTest.cpp b/test/DebugProtoTest.cpp
index 98ff43c..48aaeaa 100644
--- a/test/DebugProtoTest.cpp
+++ b/test/DebugProtoTest.cpp
@@ -20,7 +20,7 @@
   ooe.some_characters  = "Debug THIS!";
   ooe.zomg_unicode     = "\xd7\n\a\t";
 
-  cout << facebook::thrift::ThriftDebugString(ooe) << endl << endl;
+  cout << apache::thrift::ThriftDebugString(ooe) << endl << endl;
 
 
   Nesting n;
@@ -36,7 +36,7 @@
   n.my_bonk.type    = 31337;
   n.my_bonk.message = "I am a bonk... xor!";
 
-  cout << facebook::thrift::ThriftDebugString(n) << endl << endl;
+  cout << apache::thrift::ThriftDebugString(n) << endl << endl;
 
 
   HolyMoley hm;
@@ -79,7 +79,7 @@
   stage2.back().message = "nevermore";
   hm.bonks["poe"] = stage2;
 
-  cout << facebook::thrift::ThriftDebugString(hm) << endl << endl;
+  cout << apache::thrift::ThriftDebugString(hm) << endl << endl;
 
 
   return 0;
diff --git a/test/DenseProtoTest.cpp b/test/DenseProtoTest.cpp
index 68b5df9..d65a6c1 100644
--- a/test/DenseProtoTest.cpp
+++ b/test/DenseProtoTest.cpp
@@ -41,8 +41,8 @@
   using std::endl;
   using boost::shared_ptr;
   using namespace thrift::test::debug;
-  using namespace facebook::thrift::transport;
-  using namespace facebook::thrift::protocol;
+  using namespace apache::thrift::transport;
+  using namespace apache::thrift::protocol;
 
 
   OneOfEach ooe;
@@ -56,7 +56,7 @@
   ooe.some_characters  = "Debug THIS!";
   ooe.zomg_unicode     = "\xd7\n\a\t";
 
-  //cout << facebook::thrift::ThriftDebugString(ooe) << endl << endl;
+  //cout << apache::thrift::ThriftDebugString(ooe) << endl << endl;
 
 
   Nesting n;
@@ -72,7 +72,7 @@
   n.my_bonk.type    = 31337;
   n.my_bonk.message = "I am a bonk... xor!";
 
-  //cout << facebook::thrift::ThriftDebugString(n) << endl << endl;
+  //cout << apache::thrift::ThriftDebugString(n) << endl << endl;
 
 
   HolyMoley hm;
@@ -115,7 +115,7 @@
   stage2.back().message = "nevermore";
   hm.bonks["poe"] = stage2;
 
-  //cout << facebook::thrift::ThriftDebugString(hm) << endl << endl;
+  //cout << apache::thrift::ThriftDebugString(hm) << endl << endl;
 
   shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
   shared_ptr<TDenseProtocol> proto(new TDenseProtocol(buffer));
diff --git a/test/JSONProtoTest.cpp b/test/JSONProtoTest.cpp
index eb7f416..30652760 100644
--- a/test/JSONProtoTest.cpp
+++ b/test/JSONProtoTest.cpp
@@ -8,8 +8,8 @@
   using std::cout;
   using std::endl;
   using namespace thrift::test::debug;
-  using facebook::thrift::transport::TMemoryBuffer;
-  using facebook::thrift::protocol::TJSONProtocol;
+  using apache::thrift::transport::TMemoryBuffer;
+  using apache::thrift::protocol::TJSONProtocol;
 
   OneOfEach ooe;
   ooe.im_true   = true;
@@ -22,7 +22,7 @@
   ooe.some_characters  = "JSON THIS! \"\1";
   ooe.zomg_unicode     = "\xd7\n\a\t";
   ooe.base64 = "\1\2\3\255";
-  cout << facebook::thrift::ThriftJSONString(ooe) << endl << endl;
+  cout << apache::thrift::ThriftJSONString(ooe) << endl << endl;
 
 
   Nesting n;
@@ -38,7 +38,7 @@
   n.my_bonk.type    = 31337;
   n.my_bonk.message = "I am a bonk... xor!";
 
-  cout << facebook::thrift::ThriftJSONString(n) << endl << endl;
+  cout << apache::thrift::ThriftJSONString(n) << endl << endl;
 
 
   HolyMoley hm;
@@ -81,7 +81,7 @@
   stage2.back().message = "nevermore";
   hm.bonks["poe"] = stage2;
 
-  cout << facebook::thrift::ThriftJSONString(hm) << endl << endl;
+  cout << apache::thrift::ThriftJSONString(hm) << endl << endl;
 
   boost::shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer());
   boost::shared_ptr<TJSONProtocol> proto(new TJSONProtocol(buffer));
@@ -117,7 +117,7 @@
   dub.small = 1E-305;
   dub.zero = 0.0;
   dub.negzero = -0.0;
-  cout << facebook::thrift::ThriftJSONString(dub) << endl << endl;
+  cout << apache::thrift::ThriftJSONString(dub) << endl << endl;
 
   cout << "Testing base" << endl;
 
diff --git a/test/OptionalRequiredTest.cpp b/test/OptionalRequiredTest.cpp
index c3fbfd1..028ca77 100644
--- a/test/OptionalRequiredTest.cpp
+++ b/test/OptionalRequiredTest.cpp
@@ -11,9 +11,9 @@
 using std::map;
 using std::string;
 using namespace thrift::test;
-using namespace facebook::thrift;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::protocol;
+using namespace apache::thrift;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::protocol;
 
 
 /*
diff --git a/test/ReflectionTest.cpp b/test/ReflectionTest.cpp
index d60b52c..c670c82 100644
--- a/test/ReflectionTest.cpp
+++ b/test/ReflectionTest.cpp
@@ -7,13 +7,13 @@
   using std::cout;
   using std::endl;
 
-  facebook::thrift::reflection::limited::Service srv1;
+  apache::thrift::reflection::limited::Service srv1;
   thrift::test::debug::PartiallyReflectableIf::getStaticLimitedReflection(srv1);
-  cout << facebook::thrift::ThriftDebugString(srv1) << endl << endl;
+  cout << apache::thrift::ThriftDebugString(srv1) << endl << endl;
 
-  facebook::thrift::reflection::limited::Service srv2;
+  apache::thrift::reflection::limited::Service srv2;
   test::stress::ServiceIf::getStaticLimitedReflection(srv2);
-  cout << facebook::thrift::ThriftDebugString(srv2) << endl << endl;
+  cout << apache::thrift::ThriftDebugString(srv2) << endl << endl;
 
   return 0;
 }
diff --git a/test/TBufferBaseTest.cpp b/test/TBufferBaseTest.cpp
index cd394b2..ac7e9cb 100644
--- a/test/TBufferBaseTest.cpp
+++ b/test/TBufferBaseTest.cpp
@@ -6,10 +6,10 @@
 
 using std::string;
 using boost::shared_ptr;
-using facebook::thrift::transport::TMemoryBuffer;
-using facebook::thrift::transport::TBufferedTransport;
-using facebook::thrift::transport::TFramedTransport;
-using facebook::thrift::transport::test::TShortReadTransport;
+using apache::thrift::transport::TMemoryBuffer;
+using apache::thrift::transport::TBufferedTransport;
+using apache::thrift::transport::TFramedTransport;
+using apache::thrift::transport::test::TShortReadTransport;
 
 #define foreach BOOST_FOREACH
 
diff --git a/test/TFDTransportTest.cpp b/test/TFDTransportTest.cpp
index dfc2d27..5e7e032 100644
--- a/test/TFDTransportTest.cpp
+++ b/test/TFDTransportTest.cpp
@@ -2,8 +2,8 @@
 #include <stdexcept>
 #include <Thrift.h>
 #include <transport/TFDTransport.h>
-using facebook::thrift::transport::TTransportException;
-using facebook::thrift::transport::TFDTransport;
+using apache::thrift::transport::TTransportException;
+using apache::thrift::transport::TFDTransport;
 
 class DummyException : std::exception {
 };
diff --git a/test/TMemoryBufferTest.cpp b/test/TMemoryBufferTest.cpp
index 4614196..61f7ecf 100644
--- a/test/TMemoryBufferTest.cpp
+++ b/test/TMemoryBufferTest.cpp
@@ -9,8 +9,8 @@
 BOOST_AUTO_TEST_SUITE( TMemoryBufferTest )
 
 BOOST_AUTO_TEST_CASE( test_roundtrip ) {
-    using facebook::thrift::transport::TMemoryBuffer;
-    using facebook::thrift::protocol::TBinaryProtocol;
+    using apache::thrift::transport::TMemoryBuffer;
+    using apache::thrift::protocol::TBinaryProtocol;
     using boost::shared_ptr;
 
     shared_ptr<TMemoryBuffer> strBuffer(new TMemoryBuffer());
@@ -36,7 +36,7 @@
 
 BOOST_AUTO_TEST_CASE( test_copy )
   {
-    using facebook::thrift::transport::TMemoryBuffer;
+    using apache::thrift::transport::TMemoryBuffer;
     using std::string;
     using std::cout;
     using std::endl;
@@ -62,8 +62,8 @@
 
 BOOST_AUTO_TEST_CASE( test_exceptions )
   {
-    using facebook::thrift::transport::TTransportException;
-    using facebook::thrift::transport::TMemoryBuffer;
+    using apache::thrift::transport::TTransportException;
+    using apache::thrift::transport::TMemoryBuffer;
     using std::string;
 
     char data[] = "foo\0bar";
diff --git a/test/TPipedTransportTest.cpp b/test/TPipedTransportTest.cpp
index 06950ea..991032a 100644
--- a/test/TPipedTransportTest.cpp
+++ b/test/TPipedTransportTest.cpp
@@ -5,9 +5,9 @@
 #include <transport/TBufferTransports.h>
 using namespace std;
 using boost::shared_ptr;
-using facebook::thrift::transport::TTransportException;
-using facebook::thrift::transport::TPipedTransport;
-using facebook::thrift::transport::TMemoryBuffer;
+using apache::thrift::transport::TTransportException;
+using apache::thrift::transport::TPipedTransport;
+using apache::thrift::transport::TMemoryBuffer;
 
 int main() {
   shared_ptr<TMemoryBuffer> underlying(new TMemoryBuffer);
diff --git a/test/ThriftTest_extras.cpp b/test/ThriftTest_extras.cpp
index aa761a8..6a56d31 100644
--- a/test/ThriftTest_extras.cpp
+++ b/test/ThriftTest_extras.cpp
@@ -7,7 +7,7 @@
 namespace thrift { namespace test {
 
 bool Insanity::operator<(thrift::test::Insanity const& other) const {
-  using facebook::thrift::ThriftDebugString;
+  using apache::thrift::ThriftDebugString;
   return ThriftDebugString(*this) < ThriftDebugString(other);
 }
 
diff --git a/test/ZlibTest.cpp b/test/ZlibTest.cpp
index 08ec174..3084728 100644
--- a/test/ZlibTest.cpp
+++ b/test/ZlibTest.cpp
@@ -147,7 +147,7 @@
 int main() {
   using namespace std;
   using namespace boost;
-  using namespace facebook::thrift::transport;
+  using namespace apache::thrift::transport;
 
   char *file_names[] = {
     // Highly compressible.
diff --git a/test/cpp/src/TestClient.cpp b/test/cpp/src/TestClient.cpp
index 8529938..5350297 100644
--- a/test/cpp/src/TestClient.cpp
+++ b/test/cpp/src/TestClient.cpp
@@ -13,9 +13,9 @@
 
 using namespace boost;
 using namespace std;
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
 using namespace thrift::test;
 
 //extern uint32_t g_socket_syscalls;
diff --git a/test/cpp/src/TestServer.cpp b/test/cpp/src/TestServer.cpp
index 602f454..56068f1 100644
--- a/test/cpp/src/TestServer.cpp
+++ b/test/cpp/src/TestServer.cpp
@@ -19,11 +19,11 @@
 using namespace std;
 using namespace boost;
 
-using namespace facebook::thrift;
-using namespace facebook::thrift::concurrency;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::server;
+using namespace apache::thrift;
+using namespace apache::thrift::concurrency;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::server;
 
 using namespace thrift::test;
 
@@ -223,7 +223,7 @@
   }
 
   void testException(const std::string &arg)
-    throw(Xception, facebook::thrift::TException)
+    throw(Xception, apache::thrift::TException)
   {
     printf("testException(%s)\n", arg.c_str());
     if (arg.compare("Xception") == 0) {
@@ -232,7 +232,7 @@
       e.message = arg;
       throw e;
     } else if (arg.compare("ApplicationException") == 0) {
-      facebook::thrift::TException e;
+      apache::thrift::TException e;
       throw e;
     } else {
       Xtruct result;
diff --git a/test/cpp/src/main.cpp b/test/cpp/src/main.cpp
index 78491d6..d0a3cd2 100644
--- a/test/cpp/src/main.cpp
+++ b/test/cpp/src/main.cpp
@@ -28,11 +28,11 @@
 using namespace std;
 using namespace boost;
 
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::server;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::server;
+using namespace apache::thrift::concurrency;
 
 using namespace test::stress;
 
diff --git a/test/cpp/src/nb-main.cpp b/test/cpp/src/nb-main.cpp
index 164febb..188c440 100644
--- a/test/cpp/src/nb-main.cpp
+++ b/test/cpp/src/nb-main.cpp
@@ -32,11 +32,11 @@
 using namespace std;
 using namespace boost;
 
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::server;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::server;
+using namespace apache::thrift::concurrency;
 
 using namespace test::stress;
 
diff --git a/test/threads/ThreadsClient.cpp b/test/threads/ThreadsClient.cpp
index 7ad6f00..24a1540 100644
--- a/test/threads/ThreadsClient.cpp
+++ b/test/threads/ThreadsClient.cpp
@@ -11,11 +11,11 @@
 #include <thrift/concurrency/PosixThreadFactory.h>
 
 using boost::shared_ptr;
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::server;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::server;
+using namespace apache::thrift::concurrency;
 
 int main(int argc, char **argv) {
   int port = 9090;
diff --git a/test/threads/ThreadsServer.cpp b/test/threads/ThreadsServer.cpp
index 826bbdb..c4ce2c9 100644
--- a/test/threads/ThreadsServer.cpp
+++ b/test/threads/ThreadsServer.cpp
@@ -12,11 +12,11 @@
 #include <thrift/concurrency/PosixThreadFactory.h>
 
 using boost::shared_ptr;
-using namespace facebook::thrift;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::server;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::server;
+using namespace apache::thrift::concurrency;
 
 
 class ThreadsTestHandler : virtual public ThreadsTestIf {