You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ja...@apache.org on 2009/01/31 23:36:22 UTC
svn commit: r739644 [1/2] - in /incubator/thrift/trunk:
compiler/cpp/src/generate/ lib/cpp/src/ lib/cpp/src/concurrency/
lib/cpp/src/concurrency/test/ lib/cpp/src/processor/ lib/cpp/src/protocol/
lib/cpp/src/server/ lib/cpp/src/transport/ test/ test/cp...
Author: jake
Date: Sat Jan 31 22:36:20 2009
New Revision: 739644
URL: http://svn.apache.org/viewvc?rev=739644&view=rev
Log:
THRIFT-270: change cpp namespaces from facebook::thrift to apache::thrift
Modified:
incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc
incubator/thrift/trunk/lib/cpp/src/TProcessor.h
incubator/thrift/trunk/lib/cpp/src/TReflectionLocal.h
incubator/thrift/trunk/lib/cpp/src/Thrift.cpp
incubator/thrift/trunk/lib/cpp/src/Thrift.h
incubator/thrift/trunk/lib/cpp/src/concurrency/Exception.h
incubator/thrift/trunk/lib/cpp/src/concurrency/FunctionRunner.h
incubator/thrift/trunk/lib/cpp/src/concurrency/Monitor.cpp
incubator/thrift/trunk/lib/cpp/src/concurrency/Monitor.h
incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.cpp
incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h
incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.cpp
incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.h
incubator/thrift/trunk/lib/cpp/src/concurrency/Thread.h
incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.cpp
incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.h
incubator/thrift/trunk/lib/cpp/src/concurrency/TimerManager.cpp
incubator/thrift/trunk/lib/cpp/src/concurrency/TimerManager.h
incubator/thrift/trunk/lib/cpp/src/concurrency/Util.cpp
incubator/thrift/trunk/lib/cpp/src/concurrency/Util.h
incubator/thrift/trunk/lib/cpp/src/concurrency/test/ThreadFactoryTests.h
incubator/thrift/trunk/lib/cpp/src/concurrency/test/ThreadManagerTests.h
incubator/thrift/trunk/lib/cpp/src/concurrency/test/TimerManagerTests.h
incubator/thrift/trunk/lib/cpp/src/processor/PeekProcessor.cpp
incubator/thrift/trunk/lib/cpp/src/processor/PeekProcessor.h
incubator/thrift/trunk/lib/cpp/src/processor/StatsProcessor.h
incubator/thrift/trunk/lib/cpp/src/protocol/TBase64Utils.cpp
incubator/thrift/trunk/lib/cpp/src/protocol/TBase64Utils.h
incubator/thrift/trunk/lib/cpp/src/protocol/TBinaryProtocol.cpp
incubator/thrift/trunk/lib/cpp/src/protocol/TBinaryProtocol.h
incubator/thrift/trunk/lib/cpp/src/protocol/TDebugProtocol.cpp
incubator/thrift/trunk/lib/cpp/src/protocol/TDebugProtocol.h
incubator/thrift/trunk/lib/cpp/src/protocol/TDenseProtocol.cpp
incubator/thrift/trunk/lib/cpp/src/protocol/TDenseProtocol.h
incubator/thrift/trunk/lib/cpp/src/protocol/TJSONProtocol.cpp
incubator/thrift/trunk/lib/cpp/src/protocol/TJSONProtocol.h
incubator/thrift/trunk/lib/cpp/src/protocol/TOneWayProtocol.h
incubator/thrift/trunk/lib/cpp/src/protocol/TProtocol.h
incubator/thrift/trunk/lib/cpp/src/protocol/TProtocolException.h
incubator/thrift/trunk/lib/cpp/src/protocol/TProtocolTap.h
incubator/thrift/trunk/lib/cpp/src/reflection_limited_types.cpp
incubator/thrift/trunk/lib/cpp/src/reflection_limited_types.h
incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp
incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.h
incubator/thrift/trunk/lib/cpp/src/server/TServer.cpp
incubator/thrift/trunk/lib/cpp/src/server/TServer.h
incubator/thrift/trunk/lib/cpp/src/server/TSimpleServer.cpp
incubator/thrift/trunk/lib/cpp/src/server/TSimpleServer.h
incubator/thrift/trunk/lib/cpp/src/server/TThreadPoolServer.cpp
incubator/thrift/trunk/lib/cpp/src/server/TThreadPoolServer.h
incubator/thrift/trunk/lib/cpp/src/server/TThreadedServer.cpp
incubator/thrift/trunk/lib/cpp/src/server/TThreadedServer.h
incubator/thrift/trunk/lib/cpp/src/transport/TBufferTransports.cpp
incubator/thrift/trunk/lib/cpp/src/transport/TBufferTransports.h
incubator/thrift/trunk/lib/cpp/src/transport/TFDTransport.cpp
incubator/thrift/trunk/lib/cpp/src/transport/TFDTransport.h
incubator/thrift/trunk/lib/cpp/src/transport/TFileTransport.cpp
incubator/thrift/trunk/lib/cpp/src/transport/TFileTransport.h
incubator/thrift/trunk/lib/cpp/src/transport/THttpClient.cpp
incubator/thrift/trunk/lib/cpp/src/transport/THttpClient.h
incubator/thrift/trunk/lib/cpp/src/transport/TServerSocket.cpp
incubator/thrift/trunk/lib/cpp/src/transport/TServerSocket.h
incubator/thrift/trunk/lib/cpp/src/transport/TServerTransport.h
incubator/thrift/trunk/lib/cpp/src/transport/TShortReadTransport.h
incubator/thrift/trunk/lib/cpp/src/transport/TSocket.cpp
incubator/thrift/trunk/lib/cpp/src/transport/TSocket.h
incubator/thrift/trunk/lib/cpp/src/transport/TSocketPool.cpp
incubator/thrift/trunk/lib/cpp/src/transport/TSocketPool.h
incubator/thrift/trunk/lib/cpp/src/transport/TTransport.h
incubator/thrift/trunk/lib/cpp/src/transport/TTransportException.cpp
incubator/thrift/trunk/lib/cpp/src/transport/TTransportException.h
incubator/thrift/trunk/lib/cpp/src/transport/TTransportUtils.cpp
incubator/thrift/trunk/lib/cpp/src/transport/TTransportUtils.h
incubator/thrift/trunk/lib/cpp/src/transport/TZlibTransport.cpp
incubator/thrift/trunk/lib/cpp/src/transport/TZlibTransport.h
incubator/thrift/trunk/test/Benchmark.cpp
incubator/thrift/trunk/test/DebugProtoTest.cpp
incubator/thrift/trunk/test/DenseProtoTest.cpp
incubator/thrift/trunk/test/JSONProtoTest.cpp
incubator/thrift/trunk/test/OptionalRequiredTest.cpp
incubator/thrift/trunk/test/ReflectionTest.cpp
incubator/thrift/trunk/test/TBufferBaseTest.cpp
incubator/thrift/trunk/test/TFDTransportTest.cpp
incubator/thrift/trunk/test/TMemoryBufferTest.cpp
incubator/thrift/trunk/test/TPipedTransportTest.cpp
incubator/thrift/trunk/test/ThriftTest_extras.cpp
incubator/thrift/trunk/test/ZlibTest.cpp
incubator/thrift/trunk/test/cpp/src/TestClient.cpp
incubator/thrift/trunk/test/cpp/src/TestServer.cpp
incubator/thrift/trunk/test/cpp/src/main.cpp
incubator/thrift/trunk/test/cpp/src/nb-main.cpp
incubator/thrift/trunk/test/threads/ThreadsClient.cpp
incubator/thrift/trunk/test/threads/ThreadsServer.cpp
incubator/thrift/trunk/tutorial/cpp/CppClient.cpp
incubator/thrift/trunk/tutorial/cpp/CppServer.cpp
Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc Sat Jan 31 22:36:20 2009
@@ -618,7 +618,7 @@
bool write) {
string extends = "";
if (is_exception) {
- extends = " : public facebook::thrift::TException";
+ extends = " : public apache::thrift::TException";
}
// Open struct def
@@ -687,7 +687,7 @@
// Pointer to this structure's reflection local typespec.
if (gen_dense_) {
indent(out) <<
- "static facebook::thrift::reflection::local::TypeSpec* local_reflection;" <<
+ "static apache::thrift::reflection::local::TypeSpec* local_reflection;" <<
endl << endl;
}
@@ -784,11 +784,11 @@
}
if (read) {
out <<
- indent() << "uint32_t read(facebook::thrift::protocol::TProtocol* iprot);" << endl;
+ indent() << "uint32_t read(apache::thrift::protocol::TProtocol* iprot);" << endl;
}
if (write) {
out <<
- indent() << "uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const;" << endl;
+ indent() << "uint32_t write(apache::thrift::protocol::TProtocol* oprot) const;" << endl;
}
out << endl;
@@ -879,7 +879,7 @@
// For definitions of structures, do the arrays of metas and field specs also.
if (is_definition) {
out <<
- indent() << "facebook::thrift::reflection::local::FieldMeta" << endl <<
+ indent() << "apache::thrift::reflection::local::FieldMeta" << endl <<
indent() << local_reflection_name("metas", ttype) <<"[] = {" << endl;
indent_up();
for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
@@ -892,7 +892,7 @@
indent_down();
out <<
- indent() << "facebook::thrift::reflection::local::TypeSpec*" << endl <<
+ indent() << "apache::thrift::reflection::local::TypeSpec*" << endl <<
indent() << local_reflection_name("specs", ttype) <<"[] = {" << endl;
indent_up();
for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
@@ -909,7 +909,7 @@
out <<
indent() << "// " << ttype->get_fingerprint_material() << endl <<
indent() << (is_definition ? "" : "extern ") <<
- "facebook::thrift::reflection::local::TypeSpec" << endl <<
+ "apache::thrift::reflection::local::TypeSpec" << endl <<
local_reflection_name("typespec", ttype) <<
(is_definition ? "(" : ";") << endl;
@@ -921,7 +921,7 @@
indent_up();
if (ttype->is_void()) {
- indent(out) << "facebook::thrift::protocol::T_STOP";
+ indent(out) << "apache::thrift::protocol::T_STOP";
} else {
indent(out) << type_to_enum(ttype);
}
@@ -960,7 +960,7 @@
return;
}
indent(out) <<
- "facebook::thrift::reflection::local::TypeSpec* " <<
+ "apache::thrift::reflection::local::TypeSpec* " <<
ttype->get_name() << "::local_reflection = " << endl <<
indent() << " &" << local_reflection_name("typespec", ttype) << ";" <<
endl << endl;
@@ -976,7 +976,7 @@
t_struct* tstruct,
bool pointers) {
indent(out) <<
- "uint32_t " << tstruct->get_name() << "::read(facebook::thrift::protocol::TProtocol* iprot) {" << endl;
+ "uint32_t " << tstruct->get_name() << "::read(apache::thrift::protocol::TProtocol* iprot) {" << endl;
indent_up();
const vector<t_field*>& fields = tstruct->get_members();
@@ -987,12 +987,12 @@
endl <<
indent() << "uint32_t xfer = 0;" << endl <<
indent() << "std::string fname;" << endl <<
- indent() << "facebook::thrift::protocol::TType ftype;" << endl <<
+ indent() << "apache::thrift::protocol::TType ftype;" << endl <<
indent() << "int16_t fid;" << endl <<
endl <<
indent() << "xfer += iprot->readStructBegin(fname);" << endl <<
endl <<
- indent() << "using facebook::thrift::protocol::TProtocolException;" << endl <<
+ indent() << "using apache::thrift::protocol::TProtocolException;" << endl <<
endl;
// Required variables aren't in __isset, so we need tmp vars to check them.
@@ -1014,7 +1014,7 @@
// Check for field STOP marker
out <<
- indent() << "if (ftype == facebook::thrift::protocol::T_STOP) {" << endl <<
+ indent() << "if (ftype == apache::thrift::protocol::T_STOP) {" << endl <<
indent() << " break;" << endl <<
indent() << "}" << endl;
@@ -1115,7 +1115,7 @@
vector<t_field*>::const_iterator f_iter;
indent(out) <<
- "uint32_t " << tstruct->get_name() << "::write(facebook::thrift::protocol::TProtocol* oprot) const {" << endl;
+ "uint32_t " << tstruct->get_name() << "::write(apache::thrift::protocol::TProtocol* oprot) const {" << endl;
indent_up();
out <<
@@ -1177,7 +1177,7 @@
vector<t_field*>::const_iterator f_iter;
indent(out) <<
- "uint32_t " << tstruct->get_name() << "::write(facebook::thrift::protocol::TProtocol* oprot) const {" << endl;
+ "uint32_t " << tstruct->get_name() << "::write(apache::thrift::protocol::TProtocol* oprot) const {" << endl;
indent_up();
out <<
@@ -1360,12 +1360,12 @@
if (gen_reflection_limited_) {
f_header_ <<
indent() << "static void getStaticLimitedReflection" <<
- "(facebook::thrift::reflection::limited::Service & _return);" << endl;
+ "(apache::thrift::reflection::limited::Service & _return);" << endl;
// TODO(dreiss): Uncomment and test this if we decide we need
// a virtual function with this effect.
//f_header_ <<
// indent() << "virtual void getVirtualLimitedReflection" <<
- // "(facebook::thrift::reflection::limited::Service & _return) ";
+ // "(apache::thrift::reflection::limited::Service & _return) ";
//scope_up(f_header_);
//f_header_ <<
// indent() << "getStaticLimitedReflection(_return);" << endl;
@@ -1575,7 +1575,7 @@
indent_up();
f_header_ <<
- indent() << service_name_ << "Client(boost::shared_ptr<facebook::thrift::protocol::TProtocol> prot) :" << endl;
+ indent() << service_name_ << "Client(boost::shared_ptr<apache::thrift::protocol::TProtocol> prot) :" << endl;
if (extends.empty()) {
f_header_ <<
indent() << " piprot_(prot)," << endl <<
@@ -1589,7 +1589,7 @@
}
f_header_ <<
- indent() << service_name_ << "Client(boost::shared_ptr<facebook::thrift::protocol::TProtocol> iprot, boost::shared_ptr<facebook::thrift::protocol::TProtocol> oprot) :" << endl;
+ indent() << service_name_ << "Client(boost::shared_ptr<apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr<apache::thrift::protocol::TProtocol> oprot) :" << endl;
if (extends.empty()) {
f_header_ <<
indent() << " piprot_(iprot)," << endl <<
@@ -1604,12 +1604,12 @@
// Generate getters for the protocols.
f_header_ <<
- indent() << "boost::shared_ptr<facebook::thrift::protocol::TProtocol> getInputProtocol() {" << endl <<
+ indent() << "boost::shared_ptr<apache::thrift::protocol::TProtocol> getInputProtocol() {" << endl <<
indent() << " return piprot_;" << endl <<
indent() << "}" << endl;
f_header_ <<
- indent() << "boost::shared_ptr<facebook::thrift::protocol::TProtocol> getOutputProtocol() {" << endl <<
+ indent() << "boost::shared_ptr<apache::thrift::protocol::TProtocol> getOutputProtocol() {" << endl <<
indent() << " return poprot_;" << endl <<
indent() << "}" << endl;
@@ -1636,10 +1636,10 @@
" protected:" << endl;
indent_up();
f_header_ <<
- indent() << "boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot_;" << endl <<
- indent() << "boost::shared_ptr<facebook::thrift::protocol::TProtocol> poprot_;" << endl <<
- indent() << "facebook::thrift::protocol::TProtocol* iprot_;" << endl <<
- indent() << "facebook::thrift::protocol::TProtocol* oprot_;" << endl;
+ indent() << "boost::shared_ptr<apache::thrift::protocol::TProtocol> piprot_;" << endl <<
+ indent() << "boost::shared_ptr<apache::thrift::protocol::TProtocol> poprot_;" << endl <<
+ indent() << "apache::thrift::protocol::TProtocol* iprot_;" << endl <<
+ indent() << "apache::thrift::protocol::TProtocol* oprot_;" << endl;
indent_down();
}
@@ -1710,7 +1710,7 @@
// Serialize the request
f_service_ <<
indent() << "int32_t cseqid = 0;" << endl <<
- indent() << "oprot_->writeMessageBegin(\"" << (*f_iter)->get_name() << "\", facebook::thrift::protocol::T_CALL, cseqid);" << endl <<
+ indent() << "oprot_->writeMessageBegin(\"" << (*f_iter)->get_name() << "\", apache::thrift::protocol::T_CALL, cseqid);" << endl <<
endl <<
indent() << argsname << " args;" << endl;
@@ -1744,27 +1744,27 @@
endl <<
indent() << "int32_t rseqid = 0;" << endl <<
indent() << "std::string fname;" << endl <<
- indent() << "facebook::thrift::protocol::TMessageType mtype;" << endl <<
+ indent() << "apache::thrift::protocol::TMessageType mtype;" << endl <<
endl <<
indent() << "iprot_->readMessageBegin(fname, mtype, rseqid);" << endl <<
- indent() << "if (mtype == facebook::thrift::protocol::T_EXCEPTION) {" << endl <<
- indent() << " facebook::thrift::TApplicationException x;" << endl <<
+ indent() << "if (mtype == apache::thrift::protocol::T_EXCEPTION) {" << endl <<
+ indent() << " apache::thrift::TApplicationException x;" << endl <<
indent() << " x.read(iprot_);" << endl <<
indent() << " iprot_->readMessageEnd();" << endl <<
indent() << " iprot_->getTransport()->readEnd();" << endl <<
indent() << " throw x;" << endl <<
indent() << "}" << endl <<
- indent() << "if (mtype != facebook::thrift::protocol::T_REPLY) {" << endl <<
- indent() << " iprot_->skip(facebook::thrift::protocol::T_STRUCT);" << endl <<
+ indent() << "if (mtype != apache::thrift::protocol::T_REPLY) {" << endl <<
+ indent() << " iprot_->skip(apache::thrift::protocol::T_STRUCT);" << endl <<
indent() << " iprot_->readMessageEnd();" << endl <<
indent() << " iprot_->getTransport()->readEnd();" << endl <<
- indent() << " throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);" << endl <<
+ indent() << " throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);" << endl <<
indent() << "}" << endl <<
indent() << "if (fname.compare(\"" << (*f_iter)->get_name() << "\") != 0) {" << endl <<
- indent() << " iprot_->skip(facebook::thrift::protocol::T_STRUCT);" << endl <<
+ indent() << " iprot_->skip(apache::thrift::protocol::T_STRUCT);" << endl <<
indent() << " iprot_->readMessageEnd();" << endl <<
indent() << " iprot_->getTransport()->readEnd();" << endl <<
- indent() << " throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::WRONG_METHOD_NAME);" << endl <<
+ indent() << " throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME);" << endl <<
indent() << "}" << endl;
if (!(*f_iter)->get_returntype()->is_void() &&
@@ -1820,7 +1820,7 @@
"return;" << endl;
} else {
f_service_ <<
- indent() << "throw facebook::thrift::TApplicationException(facebook::thrift::TApplicationException::MISSING_RESULT, \"" << (*f_iter)->get_name() << " failed: unknown result\");" << endl;
+ indent() << "throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, \"" << (*f_iter)->get_name() << " failed: unknown result\");" << endl;
}
// Close function
@@ -1850,7 +1850,7 @@
// Generate the header portion
f_header_ <<
"class " << service_name_ << "Processor : " <<
- "virtual public facebook::thrift::TProcessor" <<
+ "virtual public apache::thrift::TProcessor" <<
extends_processor << " {" << endl;
// Protected data members
@@ -1860,7 +1860,7 @@
f_header_ <<
indent() << "boost::shared_ptr<" << service_name_ << "If> iface_;" << endl;
f_header_ <<
- indent() << "virtual bool process_fn(facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid);" << endl;
+ indent() << "virtual bool process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid);" << endl;
indent_down();
// Process function declarations
@@ -1868,10 +1868,10 @@
" private:" << endl;
indent_up();
f_header_ <<
- indent() << "std::map<std::string, void (" << service_name_ << "Processor::*)(int32_t, facebook::thrift::protocol::TProtocol*, facebook::thrift::protocol::TProtocol*)> processMap_;" << endl;
+ indent() << "std::map<std::string, void (" << service_name_ << "Processor::*)(int32_t, apache::thrift::protocol::TProtocol*, apache::thrift::protocol::TProtocol*)> processMap_;" << endl;
for (f_iter = functions.begin(); f_iter != functions.end(); ++f_iter) {
indent(f_header_) <<
- "void process_" << (*f_iter)->get_name() << "(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot);" << endl;
+ "void process_" << (*f_iter)->get_name() << "(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot);" << endl;
}
indent_down();
@@ -1906,7 +1906,7 @@
declare_map <<
indent() << "}" << endl <<
endl <<
- indent() << "virtual bool process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot, boost::shared_ptr<facebook::thrift::protocol::TProtocol> poprot);" << endl <<
+ indent() << "virtual bool process(boost::shared_ptr<apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr<apache::thrift::protocol::TProtocol> poprot);" << endl <<
indent() << "virtual ~" << service_name_ << "Processor() {}" << endl;
indent_down();
f_header_ <<
@@ -1914,25 +1914,25 @@
// Generate the server implementation
f_service_ <<
- "bool " << service_name_ << "Processor::process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot, boost::shared_ptr<facebook::thrift::protocol::TProtocol> poprot) {" << endl;
+ "bool " << service_name_ << "Processor::process(boost::shared_ptr<apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr<apache::thrift::protocol::TProtocol> poprot) {" << endl;
indent_up();
f_service_ <<
endl <<
- indent() << "facebook::thrift::protocol::TProtocol* iprot = piprot.get();" << endl <<
- indent() << "facebook::thrift::protocol::TProtocol* oprot = poprot.get();" << endl <<
+ indent() << "apache::thrift::protocol::TProtocol* iprot = piprot.get();" << endl <<
+ indent() << "apache::thrift::protocol::TProtocol* oprot = poprot.get();" << endl <<
indent() << "std::string fname;" << endl <<
- indent() << "facebook::thrift::protocol::TMessageType mtype;" << endl <<
+ indent() << "apache::thrift::protocol::TMessageType mtype;" << endl <<
indent() << "int32_t seqid;" << endl <<
endl <<
indent() << "iprot->readMessageBegin(fname, mtype, seqid);" << endl <<
endl <<
- indent() << "if (mtype != facebook::thrift::protocol::T_CALL) {" << endl <<
- indent() << " iprot->skip(facebook::thrift::protocol::T_STRUCT);" << endl <<
+ indent() << "if (mtype != apache::thrift::protocol::T_CALL) {" << endl <<
+ indent() << " iprot->skip(apache::thrift::protocol::T_STRUCT);" << endl <<
indent() << " iprot->readMessageEnd();" << endl <<
indent() << " iprot->getTransport()->readEnd();" << endl <<
- indent() << " facebook::thrift::TApplicationException x(facebook::thrift::TApplicationException::INVALID_MESSAGE_TYPE);" << endl <<
- indent() << " oprot->writeMessageBegin(fname, facebook::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
+ indent() << " apache::thrift::TApplicationException x(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE);" << endl <<
+ indent() << " oprot->writeMessageBegin(fname, apache::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
indent() << " x.write(oprot);" << endl <<
indent() << " oprot->writeMessageEnd();" << endl <<
indent() << " oprot->getTransport()->flush();" << endl <<
@@ -1949,21 +1949,21 @@
endl;
f_service_ <<
- "bool " << service_name_ << "Processor::process_fn(facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) {" << endl;
+ "bool " << service_name_ << "Processor::process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) {" << endl;
indent_up();
// HOT: member function pointer map
f_service_ <<
- indent() << "std::map<std::string, void (" << service_name_ << "Processor::*)(int32_t, facebook::thrift::protocol::TProtocol*, facebook::thrift::protocol::TProtocol*)>::iterator pfn;" << endl <<
+ indent() << "std::map<std::string, void (" << service_name_ << "Processor::*)(int32_t, apache::thrift::protocol::TProtocol*, apache::thrift::protocol::TProtocol*)>::iterator pfn;" << endl <<
indent() << "pfn = processMap_.find(fname);" << endl <<
indent() << "if (pfn == processMap_.end()) {" << endl;
if (extends.empty()) {
f_service_ <<
- indent() << " iprot->skip(facebook::thrift::protocol::T_STRUCT);" << endl <<
+ indent() << " iprot->skip(apache::thrift::protocol::T_STRUCT);" << endl <<
indent() << " iprot->readMessageEnd();" << endl <<
indent() << " iprot->getTransport()->readEnd();" << endl <<
- indent() << " facebook::thrift::TApplicationException x(facebook::thrift::TApplicationException::UNKNOWN_METHOD, \"Invalid method name: '\"+fname+\"'\");" << endl <<
- indent() << " oprot->writeMessageBegin(fname, facebook::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
+ indent() << " apache::thrift::TApplicationException x(apache::thrift::TApplicationException::UNKNOWN_METHOD, \"Invalid method name: '\"+fname+\"'\");" << endl <<
+ indent() << " oprot->writeMessageBegin(fname, apache::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
indent() << " x.write(oprot);" << endl <<
indent() << " oprot->writeMessageEnd();" << endl <<
indent() << " oprot->getTransport()->flush();" << endl <<
@@ -2034,7 +2034,7 @@
f_service_ <<
"void " << tservice->get_name() << "Processor::" <<
"process_" << tfunction->get_name() <<
- "(int32_t seqid, facebook::thrift::protocol::TProtocol* iprot, facebook::thrift::protocol::TProtocol* oprot)" << endl;
+ "(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot)" << endl;
scope_up(f_service_);
string argsname = tservice->get_name() + "_" + tfunction->get_name() + "_args";
@@ -2120,8 +2120,8 @@
if (!tfunction->is_async()) {
indent_up();
f_service_ <<
- indent() << "facebook::thrift::TApplicationException x(e.what());" << endl <<
- indent() << "oprot->writeMessageBegin(\"" << tfunction->get_name() << "\", facebook::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
+ indent() << "apache::thrift::TApplicationException x(e.what());" << endl <<
+ indent() << "oprot->writeMessageBegin(\"" << tfunction->get_name() << "\", apache::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
indent() << "x.write(oprot);" << endl <<
indent() << "oprot->writeMessageEnd();" << endl <<
indent() << "oprot->getTransport()->flush();" << endl <<
@@ -2144,7 +2144,7 @@
// Serialize the result into a struct
f_service_ <<
endl <<
- indent() << "oprot->writeMessageBegin(\"" << tfunction->get_name() << "\", facebook::thrift::protocol::T_REPLY, seqid);" << endl <<
+ indent() << "oprot->writeMessageBegin(\"" << tfunction->get_name() << "\", apache::thrift::protocol::T_REPLY, seqid);" << endl <<
indent() << "result.write(oprot);" << endl <<
indent() << "oprot->writeMessageEnd();" << endl <<
indent() << "oprot->getTransport()->flush();" << endl <<
@@ -2268,10 +2268,10 @@
// Open function
f_service_ <<
indent() << "void " << tservice->get_name() << "If::getStaticLimitedReflection" <<
- "(facebook::thrift::reflection::limited::Service & _return) ";
+ "(apache::thrift::reflection::limited::Service & _return) ";
scope_up(f_service_);
- f_service_ << indent() << "using namespace facebook::thrift::reflection::limited;" << endl;
+ f_service_ << indent() << "using namespace apache::thrift::reflection::limited;" << endl;
f_service_ << indent() << "_return.name = \"" << tservice->get_name() << "\";" << endl;
f_service_ << indent() << "_return.fully_reflected = true;" << endl;
@@ -2340,10 +2340,10 @@
"#include <transport/TServerSocket.h>" << endl <<
"#include <transport/TBufferTransports.h>" << endl <<
endl <<
- "using namespace facebook::thrift;" << endl <<
- "using namespace facebook::thrift::protocol;" << endl <<
- "using namespace facebook::thrift::transport;" << endl <<
- "using namespace facebook::thrift::server;" << endl <<
+ "using namespace apache::thrift;" << endl <<
+ "using namespace apache::thrift::protocol;" << endl <<
+ "using namespace apache::thrift::transport;" << endl <<
+ "using namespace apache::thrift::server;" << endl <<
endl <<
"using boost::shared_ptr;" << endl <<
endl;
@@ -2507,18 +2507,18 @@
// Declare variables, read header
if (ttype->is_map()) {
out <<
- indent() << "facebook::thrift::protocol::TType " << ktype << ";" << endl <<
- indent() << "facebook::thrift::protocol::TType " << vtype << ";" << endl <<
+ indent() << "apache::thrift::protocol::TType " << ktype << ";" << endl <<
+ indent() << "apache::thrift::protocol::TType " << vtype << ";" << endl <<
indent() << "iprot->readMapBegin(" <<
ktype << ", " << vtype << ", " << size << ");" << endl;
} else if (ttype->is_set()) {
out <<
- indent() << "facebook::thrift::protocol::TType " << etype << ";" << endl <<
+ indent() << "apache::thrift::protocol::TType " << etype << ";" << endl <<
indent() << "iprot->readSetBegin(" <<
etype << ", " << size << ");" << endl;
} else if (ttype->is_list()) {
out <<
- indent() << "facebook::thrift::protocol::TType " << etype << ";" << endl <<
+ indent() << "apache::thrift::protocol::TType " << etype << ";" << endl <<
indent() << "iprot->readListBegin(" <<
etype << ", " << size << ");" << endl;
if (!use_push) {
@@ -3084,32 +3084,32 @@
case t_base_type::TYPE_VOID:
throw "NO T_VOID CONSTRUCT";
case t_base_type::TYPE_STRING:
- return "facebook::thrift::protocol::T_STRING";
+ return "apache::thrift::protocol::T_STRING";
case t_base_type::TYPE_BOOL:
- return "facebook::thrift::protocol::T_BOOL";
+ return "apache::thrift::protocol::T_BOOL";
case t_base_type::TYPE_BYTE:
- return "facebook::thrift::protocol::T_BYTE";
+ return "apache::thrift::protocol::T_BYTE";
case t_base_type::TYPE_I16:
- return "facebook::thrift::protocol::T_I16";
+ return "apache::thrift::protocol::T_I16";
case t_base_type::TYPE_I32:
- return "facebook::thrift::protocol::T_I32";
+ return "apache::thrift::protocol::T_I32";
case t_base_type::TYPE_I64:
- return "facebook::thrift::protocol::T_I64";
+ return "apache::thrift::protocol::T_I64";
case t_base_type::TYPE_DOUBLE:
- return "facebook::thrift::protocol::T_DOUBLE";
+ return "apache::thrift::protocol::T_DOUBLE";
}
} else if (type->is_enum()) {
- return "facebook::thrift::protocol::T_I32";
+ return "apache::thrift::protocol::T_I32";
} else if (type->is_struct()) {
- return "facebook::thrift::protocol::T_STRUCT";
+ return "apache::thrift::protocol::T_STRUCT";
} else if (type->is_xception()) {
- return "facebook::thrift::protocol::T_STRUCT";
+ return "apache::thrift::protocol::T_STRUCT";
} else if (type->is_map()) {
- return "facebook::thrift::protocol::T_MAP";
+ return "apache::thrift::protocol::T_MAP";
} else if (type->is_set()) {
- return "facebook::thrift::protocol::T_SET";
+ return "apache::thrift::protocol::T_SET";
} else if (type->is_list()) {
- return "facebook::thrift::protocol::T_LIST";
+ return "apache::thrift::protocol::T_LIST";
}
throw "INVALID TYPE IN type_to_enum: " + type->get_name();
Modified: incubator/thrift/trunk/lib/cpp/src/TProcessor.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/TProcessor.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/TProcessor.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/TProcessor.h Sat Jan 31 22:36:20 2009
@@ -11,7 +11,7 @@
#include <protocol/TProtocol.h>
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
/**
* A processor is a generic object that acts upon two streams of data, one
@@ -28,7 +28,7 @@
virtual bool process(boost::shared_ptr<protocol::TProtocol> in,
boost::shared_ptr<protocol::TProtocol> out) = 0;
- bool process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> io) {
+ bool process(boost::shared_ptr<apache::thrift::protocol::TProtocol> io) {
return process(io, io);
}
@@ -36,6 +36,6 @@
TProcessor() {}
};
-}} // facebook::thrift
+}} // apache::thrift
#endif // #ifndef _THRIFT_PROCESSOR_H_
Modified: incubator/thrift/trunk/lib/cpp/src/TReflectionLocal.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/TReflectionLocal.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/TReflectionLocal.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/TReflectionLocal.h Sat Jan 31 22:36:20 2009
@@ -19,9 +19,9 @@
* @author David Reiss <dr...@facebook.com>
*/
-namespace facebook { namespace thrift { namespace reflection { namespace local {
+namespace apache { namespace thrift { namespace reflection { namespace local {
-using facebook::thrift::protocol::TType;
+using apache::thrift::protocol::TType;
// We include this many bytes of the structure's fingerprint when serializing
// a top-level structure. Long enough to make collisions unlikely, short
@@ -79,6 +79,6 @@
};
-}}}} // facebook::thrift::reflection::local
+}}}} // apache::thrift::reflection::local
#endif // #ifndef _THRIFT_TREFLECTIONLOCAL_H_
Modified: incubator/thrift/trunk/lib/cpp/src/Thrift.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/Thrift.cpp?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/Thrift.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/Thrift.cpp Sat Jan 31 22:36:20 2009
@@ -11,7 +11,7 @@
#include <stdarg.h>
#include <stdio.h>
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
TOutput GlobalOutput;
@@ -77,29 +77,29 @@
#endif // HAVE_STRERROR_R
}
-uint32_t TApplicationException::read(facebook::thrift::protocol::TProtocol* iprot) {
+uint32_t TApplicationException::read(apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
std::string fname;
- facebook::thrift::protocol::TType ftype;
+ apache::thrift::protocol::TType ftype;
int16_t fid;
xfer += iprot->readStructBegin(fname);
while (true) {
xfer += iprot->readFieldBegin(fname, ftype, fid);
- if (ftype == facebook::thrift::protocol::T_STOP) {
+ if (ftype == apache::thrift::protocol::T_STOP) {
break;
}
switch (fid) {
case 1:
- if (ftype == facebook::thrift::protocol::T_STRING) {
+ if (ftype == apache::thrift::protocol::T_STRING) {
xfer += iprot->readString(message_);
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
- if (ftype == facebook::thrift::protocol::T_I32) {
+ if (ftype == apache::thrift::protocol::T_I32) {
int32_t type;
xfer += iprot->readI32(type);
type_ = (TApplicationExceptionType)type;
@@ -118,13 +118,13 @@
return xfer;
}
-uint32_t TApplicationException::write(facebook::thrift::protocol::TProtocol* oprot) const {
+uint32_t TApplicationException::write(apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("TApplicationException");
- xfer += oprot->writeFieldBegin("message", facebook::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1);
xfer += oprot->writeString(message_);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("type", facebook::thrift::protocol::T_I32, 2);
+ xfer += oprot->writeFieldBegin("type", apache::thrift::protocol::T_I32, 2);
xfer += oprot->writeI32(type_);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
@@ -132,4 +132,4 @@
return xfer;
}
-}} // facebook::thrift
+}} // apache::thrift
Modified: incubator/thrift/trunk/lib/cpp/src/Thrift.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/Thrift.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/Thrift.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/Thrift.h Sat Jan 31 22:36:20 2009
@@ -24,7 +24,7 @@
#include "TLogging.h"
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
class TOutput {
public:
@@ -171,6 +171,6 @@
}}
-}} // facebook::thrift
+}} // apache::thrift
#endif // #ifndef _THRIFT_THRIFT_H_
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/Exception.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/Exception.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/Exception.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/Exception.h Sat Jan 31 22:36:20 2009
@@ -10,31 +10,31 @@
#include <exception>
#include <Thrift.h>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
-class NoSuchTaskException : public facebook::thrift::TException {};
+class NoSuchTaskException : public apache::thrift::TException {};
-class UncancellableTaskException : public facebook::thrift::TException {};
+class UncancellableTaskException : public apache::thrift::TException {};
-class InvalidArgumentException : public facebook::thrift::TException {};
+class InvalidArgumentException : public apache::thrift::TException {};
-class IllegalStateException : public facebook::thrift::TException {};
+class IllegalStateException : public apache::thrift::TException {};
-class TimedOutException : public facebook::thrift::TException {
+class TimedOutException : public apache::thrift::TException {
public:
TimedOutException():TException("TimedOutException"){};
TimedOutException(const std::string& message ) :
TException(message) {}
};
-class TooManyPendingTasksException : public facebook::thrift::TException {
+class TooManyPendingTasksException : public apache::thrift::TException {
public:
TooManyPendingTasksException():TException("TooManyPendingTasksException"){};
TooManyPendingTasksException(const std::string& message ) :
TException(message) {}
};
-class SystemResourceException : public facebook::thrift::TException {
+class SystemResourceException : public apache::thrift::TException {
public:
SystemResourceException() {}
@@ -42,6 +42,6 @@
TException(message) {}
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/FunctionRunner.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/FunctionRunner.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/FunctionRunner.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/FunctionRunner.h Sat Jan 31 22:36:20 2009
@@ -10,7 +10,7 @@
#include <tr1/functional>
#include "thrift/lib/cpp/concurrency/Thread.h"
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Convenient implementation of Runnable that will execute arbitrary callbacks.
@@ -60,6 +60,6 @@
VoidFunc func_;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_FUNCTION_RUNNER_H
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/Monitor.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/Monitor.cpp?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/Monitor.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/Monitor.cpp Sat Jan 31 22:36:20 2009
@@ -15,7 +15,7 @@
#include <pthread.h>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Monitor implementation using the POSIX pthread library
@@ -122,4 +122,4 @@
void Monitor::notifyAll() const { impl_->notifyAll(); }
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/Monitor.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/Monitor.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/Monitor.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/Monitor.h Sat Jan 31 22:36:20 2009
@@ -9,7 +9,7 @@
#include "Exception.h"
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* A monitor is a combination mutex and condition-event. Waiting and
@@ -67,6 +67,6 @@
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_MONITOR_H_
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.cpp?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.cpp Sat Jan 31 22:36:20 2009
@@ -11,7 +11,7 @@
using boost::shared_ptr;
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Implementation of Mutex class using POSIX mutex
@@ -145,5 +145,5 @@
void ReadWriteMutex::release() const { impl_->release(); }
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h Sat Jan 31 22:36:20 2009
@@ -9,7 +9,7 @@
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* A simple mutex class
@@ -95,6 +95,6 @@
#define RWGuard(m) incorrect_use_of_RWGuard(m)
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_MUTEX_H_
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.cpp?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.cpp Sat Jan 31 22:36:20 2009
@@ -18,7 +18,7 @@
#include <boost/weak_ptr.hpp>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
using boost::shared_ptr;
using boost::weak_ptr;
@@ -293,4 +293,4 @@
Thread::id_t PosixThreadFactory::getCurrentThreadId() const { return impl_->getCurrentThreadId(); }
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.h Sat Jan 31 22:36:20 2009
@@ -11,7 +11,7 @@
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* A thread factory to create posix threads
@@ -113,6 +113,6 @@
boost::shared_ptr<Impl> impl_;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_POSIXTHREADFACTORY_H_
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/Thread.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/Thread.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/Thread.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/Thread.h Sat Jan 31 22:36:20 2009
@@ -10,7 +10,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
class Thread;
@@ -49,7 +49,7 @@
* is difficult to abstract across platforms and is left for platform-specific
* ThreadFactory implemtations to deal with
*
- * @see facebook::thrift::concurrency::ThreadFactory)
+ * @see apache::thrift::concurrency::ThreadFactory)
*/
class Thread {
@@ -107,6 +107,6 @@
virtual Thread::id_t getCurrentThreadId() const = 0;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_THREAD_H_
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.cpp?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.cpp Sat Jan 31 22:36:20 2009
@@ -18,7 +18,7 @@
#include <iostream>
#endif //defined(DEBUG)
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
@@ -477,5 +477,5 @@
return shared_ptr<ThreadManager>(new SimpleThreadManager(count, pendingTaskCountMax));
}
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.h Sat Jan 31 22:36:20 2009
@@ -11,7 +11,7 @@
#include <sys/types.h>
#include "Thread.h"
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Thread Pool Manager and related classes
@@ -152,6 +152,6 @@
class Impl;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_THREADMANAGER_H_
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/TimerManager.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/TimerManager.cpp?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/TimerManager.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/TimerManager.cpp Sat Jan 31 22:36:20 2009
@@ -12,7 +12,7 @@
#include <iostream>
#include <set>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
using boost::shared_ptr;
@@ -268,5 +268,5 @@
const TimerManager::STATE TimerManager::state() const { return state_; }
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/TimerManager.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/TimerManager.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/TimerManager.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/TimerManager.h Sat Jan 31 22:36:20 2009
@@ -15,7 +15,7 @@
#include <map>
#include <time.h>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Timer Manager
@@ -103,6 +103,6 @@
boost::shared_ptr<Thread> dispatcherThread_;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_TIMERMANAGER_H_
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/Util.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/Util.cpp?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/Util.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/Util.cpp Sat Jan 31 22:36:20 2009
@@ -16,7 +16,7 @@
#include <sys/time.h>
#endif // defined(HAVE_CLOCK_GETTIME)
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
const int64_t Util::currentTime() {
int64_t result;
@@ -39,4 +39,4 @@
}
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/Util.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/Util.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/Util.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/Util.h Sat Jan 31 22:36:20 2009
@@ -13,7 +13,7 @@
#include <time.h>
#include <sys/time.h>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Utility methods
@@ -83,6 +83,6 @@
static const int64_t currentTime();
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_UTIL_H_
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/test/ThreadFactoryTests.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/test/ThreadFactoryTests.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/test/ThreadFactoryTests.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/test/ThreadFactoryTests.h Sat Jan 31 22:36:20 2009
@@ -14,10 +14,10 @@
#include <iostream>
#include <set>
-namespace facebook { namespace thrift { namespace concurrency { namespace test {
+namespace apache { namespace thrift { namespace concurrency { namespace test {
using boost::shared_ptr;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift::concurrency;
/**
* ThreadManagerTests class
@@ -341,5 +341,5 @@
const double ThreadFactoryTests::ERROR = .20;
-}}}} // facebook::thrift::concurrency::test
+}}}} // apache::thrift::concurrency::test
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/test/ThreadManagerTests.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/test/ThreadManagerTests.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/test/ThreadManagerTests.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/test/ThreadManagerTests.h Sat Jan 31 22:36:20 2009
@@ -16,9 +16,9 @@
#include <set>
#include <stdint.h>
-namespace facebook { namespace thrift { namespace concurrency { namespace test {
+namespace apache { namespace thrift { namespace concurrency { namespace test {
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift::concurrency;
/**
* ThreadManagerTests class
@@ -348,7 +348,7 @@
const double ThreadManagerTests::ERROR = .20;
-}}}} // facebook::thrift::concurrency
+}}}} // apache::thrift::concurrency
-using namespace facebook::thrift::concurrency::test;
+using namespace apache::thrift::concurrency::test;
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/test/TimerManagerTests.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/test/TimerManagerTests.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/test/TimerManagerTests.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/test/TimerManagerTests.h Sat Jan 31 22:36:20 2009
@@ -12,9 +12,9 @@
#include <assert.h>
#include <iostream>
-namespace facebook { namespace thrift { namespace concurrency { namespace test {
+namespace apache { namespace thrift { namespace concurrency { namespace test {
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift::concurrency;
/**
* ThreadManagerTests class
@@ -126,5 +126,5 @@
const double TimerManagerTests::ERROR = .20;
-}}}} // facebook::thrift::concurrency
+}}}} // apache::thrift::concurrency
Modified: incubator/thrift/trunk/lib/cpp/src/processor/PeekProcessor.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/processor/PeekProcessor.cpp?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/processor/PeekProcessor.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/processor/PeekProcessor.cpp Sat Jan 31 22:36:20 2009
@@ -1,10 +1,10 @@
#include "PeekProcessor.h"
-using namespace facebook::thrift::transport;
-using namespace facebook::thrift::protocol;
-using namespace facebook::thrift;
+using namespace apache::thrift::transport;
+using namespace apache::thrift::protocol;
+using namespace apache::thrift;
-namespace facebook { namespace thrift { namespace processor {
+namespace apache { namespace thrift { namespace processor {
PeekProcessor::PeekProcessor() {
memoryBuffer_.reset(new TMemoryBuffer());
Modified: incubator/thrift/trunk/lib/cpp/src/processor/PeekProcessor.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/processor/PeekProcessor.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/processor/PeekProcessor.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/processor/PeekProcessor.h Sat Jan 31 22:36:20 2009
@@ -14,7 +14,7 @@
#include <transport/TBufferTransports.h>
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace processor {
+namespace apache { namespace thrift { namespace processor {
/*
* Class for peeking at the raw data that is being processed by another processor
@@ -22,7 +22,7 @@
*
* @author James Wang <jw...@facebook.com>
*/
-class PeekProcessor : public facebook::thrift::TProcessor {
+class PeekProcessor : public apache::thrift::TProcessor {
public:
PeekProcessor();
@@ -32,34 +32,34 @@
// protocolFactory - the protocol factory used to wrap the memory buffer
// transportFactory - this TPipedTransportFactory is used to wrap the source transport
// via a call to getPipedTransport
- void initialize(boost::shared_ptr<facebook::thrift::TProcessor> actualProcessor,
- boost::shared_ptr<facebook::thrift::protocol::TProtocolFactory> protocolFactory,
- boost::shared_ptr<facebook::thrift::transport::TPipedTransportFactory> transportFactory);
+ void initialize(boost::shared_ptr<apache::thrift::TProcessor> actualProcessor,
+ boost::shared_ptr<apache::thrift::protocol::TProtocolFactory> protocolFactory,
+ boost::shared_ptr<apache::thrift::transport::TPipedTransportFactory> transportFactory);
- boost::shared_ptr<facebook::thrift::transport::TTransport> getPipedTransport(boost::shared_ptr<facebook::thrift::transport::TTransport> in);
+ boost::shared_ptr<apache::thrift::transport::TTransport> getPipedTransport(boost::shared_ptr<apache::thrift::transport::TTransport> in);
- void setTargetTransport(boost::shared_ptr<facebook::thrift::transport::TTransport> targetTransport);
+ void setTargetTransport(boost::shared_ptr<apache::thrift::transport::TTransport> targetTransport);
- virtual bool process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> in,
- boost::shared_ptr<facebook::thrift::protocol::TProtocol> out);
+ virtual bool process(boost::shared_ptr<apache::thrift::protocol::TProtocol> in,
+ boost::shared_ptr<apache::thrift::protocol::TProtocol> out);
// The following three functions can be overloaded by child classes to
// achieve desired peeking behavior
virtual void peekName(const std::string& fname);
virtual void peekBuffer(uint8_t* buffer, uint32_t size);
- virtual void peek(boost::shared_ptr<facebook::thrift::protocol::TProtocol> in,
- facebook::thrift::protocol::TType ftype,
+ virtual void peek(boost::shared_ptr<apache::thrift::protocol::TProtocol> in,
+ apache::thrift::protocol::TType ftype,
int16_t fid);
virtual void peekEnd();
private:
- boost::shared_ptr<facebook::thrift::TProcessor> actualProcessor_;
- boost::shared_ptr<facebook::thrift::protocol::TProtocol> pipedProtocol_;
- boost::shared_ptr<facebook::thrift::transport::TPipedTransportFactory> transportFactory_;
- boost::shared_ptr<facebook::thrift::transport::TMemoryBuffer> memoryBuffer_;
- boost::shared_ptr<facebook::thrift::transport::TTransport> targetTransport_;
+ boost::shared_ptr<apache::thrift::TProcessor> actualProcessor_;
+ boost::shared_ptr<apache::thrift::protocol::TProtocol> pipedProtocol_;
+ boost::shared_ptr<apache::thrift::transport::TPipedTransportFactory> transportFactory_;
+ boost::shared_ptr<apache::thrift::transport::TMemoryBuffer> memoryBuffer_;
+ boost::shared_ptr<apache::thrift::transport::TTransport> targetTransport_;
};
-}}} // facebook::thrift::processor
+}}} // apache::thrift::processor
#endif
Modified: incubator/thrift/trunk/lib/cpp/src/processor/StatsProcessor.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/processor/StatsProcessor.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/processor/StatsProcessor.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/processor/StatsProcessor.h Sat Jan 31 22:36:20 2009
@@ -12,14 +12,14 @@
#include <protocol/TProtocol.h>
#include <TProcessor.h>
-namespace facebook { namespace thrift { namespace processor {
+namespace apache { namespace thrift { namespace processor {
/*
* Class for keeping track of function call statistics and printing them if desired
*
* @author James Wang <jw...@facebook.com>
*/
-class StatsProcessor : public facebook::thrift::TProcessor {
+class StatsProcessor : public apache::thrift::TProcessor {
public:
StatsProcessor(bool print, bool frequency)
: print_(print),
@@ -27,20 +27,20 @@
{}
virtual ~StatsProcessor() {};
- virtual bool process(boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot, boost::shared_ptr<facebook::thrift::protocol::TProtocol> poprot) {
+ virtual bool process(boost::shared_ptr<apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr<apache::thrift::protocol::TProtocol> poprot) {
piprot_ = piprot;
std::string fname;
- facebook::thrift::protocol::TMessageType mtype;
+ apache::thrift::protocol::TMessageType mtype;
int32_t seqid;
piprot_->readMessageBegin(fname, mtype, seqid);
- if (mtype != facebook::thrift::protocol::T_CALL) {
+ if (mtype != apache::thrift::protocol::T_CALL) {
if (print_) {
printf("Unknown message type\n");
}
- throw facebook::thrift::TException("Unexpected message type");
+ throw apache::thrift::TException("Unexpected message type");
}
if (print_) {
printf("%s (", fname.c_str());
@@ -53,12 +53,12 @@
}
}
- facebook::thrift::protocol::TType ftype;
+ apache::thrift::protocol::TType ftype;
int16_t fid;
while (true) {
piprot_->readFieldBegin(fname, ftype, fid);
- if (ftype == facebook::thrift::protocol::T_STOP) {
+ if (ftype == apache::thrift::protocol::T_STOP) {
break;
}
@@ -79,9 +79,9 @@
}
protected:
- void printAndPassToBuffer(facebook::thrift::protocol::TType ftype) {
+ void printAndPassToBuffer(apache::thrift::protocol::TType ftype) {
switch (ftype) {
- case facebook::thrift::protocol::T_BOOL:
+ case apache::thrift::protocol::T_BOOL:
{
bool boolv;
piprot_->readBool(boolv);
@@ -90,7 +90,7 @@
}
}
break;
- case facebook::thrift::protocol::T_BYTE:
+ case apache::thrift::protocol::T_BYTE:
{
int8_t bytev;
piprot_->readByte(bytev);
@@ -99,7 +99,7 @@
}
}
break;
- case facebook::thrift::protocol::T_I16:
+ case apache::thrift::protocol::T_I16:
{
int16_t i16;
piprot_->readI16(i16);
@@ -108,7 +108,7 @@
}
}
break;
- case facebook::thrift::protocol::T_I32:
+ case apache::thrift::protocol::T_I32:
{
int32_t i32;
piprot_->readI32(i32);
@@ -117,7 +117,7 @@
}
}
break;
- case facebook::thrift::protocol::T_I64:
+ case apache::thrift::protocol::T_I64:
{
int64_t i64;
piprot_->readI64(i64);
@@ -126,7 +126,7 @@
}
}
break;
- case facebook::thrift::protocol::T_DOUBLE:
+ case apache::thrift::protocol::T_DOUBLE:
{
double dub;
piprot_->readDouble(dub);
@@ -135,7 +135,7 @@
}
}
break;
- case facebook::thrift::protocol::T_STRING:
+ case apache::thrift::protocol::T_STRING:
{
std::string str;
piprot_->readString(str);
@@ -144,18 +144,18 @@
}
}
break;
- case facebook::thrift::protocol::T_STRUCT:
+ case apache::thrift::protocol::T_STRUCT:
{
std::string name;
int16_t fid;
- facebook::thrift::protocol::TType ftype;
+ apache::thrift::protocol::TType ftype;
piprot_->readStructBegin(name);
if (print_) {
printf("<");
}
while (true) {
piprot_->readFieldBegin(name, ftype, fid);
- if (ftype == facebook::thrift::protocol::T_STOP) {
+ if (ftype == apache::thrift::protocol::T_STOP) {
break;
}
printAndPassToBuffer(ftype);
@@ -170,10 +170,10 @@
}
}
break;
- case facebook::thrift::protocol::T_MAP:
+ case apache::thrift::protocol::T_MAP:
{
- facebook::thrift::protocol::TType keyType;
- facebook::thrift::protocol::TType valType;
+ apache::thrift::protocol::TType keyType;
+ apache::thrift::protocol::TType valType;
uint32_t i, size;
piprot_->readMapBegin(keyType, valType, size);
if (print_) {
@@ -195,9 +195,9 @@
}
}
break;
- case facebook::thrift::protocol::T_SET:
+ case apache::thrift::protocol::T_SET:
{
- facebook::thrift::protocol::TType elemType;
+ apache::thrift::protocol::TType elemType;
uint32_t i, size;
piprot_->readSetBegin(elemType, size);
if (print_) {
@@ -215,9 +215,9 @@
}
}
break;
- case facebook::thrift::protocol::T_LIST:
+ case apache::thrift::protocol::T_LIST:
{
- facebook::thrift::protocol::TType elemType;
+ apache::thrift::protocol::TType elemType;
uint32_t i, size;
piprot_->readListBegin(elemType, size);
if (print_) {
@@ -240,13 +240,13 @@
}
}
- boost::shared_ptr<facebook::thrift::protocol::TProtocol> piprot_;
+ boost::shared_ptr<apache::thrift::protocol::TProtocol> piprot_;
std::map<std::string, int64_t> frequency_map_;
bool print_;
bool frequency_;
};
-}}} // facebook::thrift::processor
+}}} // apache::thrift::processor
#endif
Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TBase64Utils.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TBase64Utils.cpp?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TBase64Utils.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TBase64Utils.cpp Sat Jan 31 22:36:20 2009
@@ -10,7 +10,7 @@
using std::string;
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
static const uint8_t *kBase64EncodeTable = (const uint8_t *)
@@ -63,4 +63,4 @@
}
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TBase64Utils.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TBase64Utils.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TBase64Utils.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TBase64Utils.h Sat Jan 31 22:36:20 2009
@@ -9,7 +9,7 @@
#include <string>
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
// in must be at least len bytes
// len must be 1, 2, or 3
@@ -23,6 +23,6 @@
// no '=' padding should be included in the input
void base64_decode(uint8_t *buf, uint32_t len);
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
#endif // #define _THRIFT_PROTOCOL_TBASE64UTILS_H_
Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TBinaryProtocol.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TBinaryProtocol.cpp?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TBinaryProtocol.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TBinaryProtocol.cpp Sat Jan 31 22:36:20 2009
@@ -51,7 +51,7 @@
}
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
uint32_t TBinaryProtocol::writeMessageBegin(const std::string& name,
const TMessageType messageType,
@@ -419,4 +419,4 @@
return (uint32_t)size;
}
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TBinaryProtocol.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TBinaryProtocol.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TBinaryProtocol.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TBinaryProtocol.h Sat Jan 31 22:36:20 2009
@@ -11,7 +11,7 @@
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
/**
* The default binary protocol for thrift. Writes all data in a very basic
@@ -237,6 +237,6 @@
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
#endif // #ifndef _THRIFT_PROTOCOL_TBINARYPROTOCOL_H_
Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TDebugProtocol.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TDebugProtocol.cpp?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TDebugProtocol.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TDebugProtocol.cpp Sat Jan 31 22:36:20 2009
@@ -25,7 +25,7 @@
}
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
string TDebugProtocol::fieldTypeName(TType type) {
switch (type) {
@@ -330,4 +330,4 @@
return TDebugProtocol::writeString(str);
}
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TDebugProtocol.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TDebugProtocol.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TDebugProtocol.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TDebugProtocol.h Sat Jan 31 22:36:20 2009
@@ -12,7 +12,7 @@
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
/*
@@ -153,18 +153,18 @@
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
// TODO(dreiss): Move (part of) ThriftDebugString into a .cpp file and remove this.
#include <transport/TBufferTransports.h>
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
template<typename ThriftStruct>
std::string ThriftDebugString(const ThriftStruct& ts) {
- using namespace facebook::thrift::transport;
- using namespace facebook::thrift::protocol;
+ using namespace apache::thrift::transport;
+ using namespace apache::thrift::protocol;
TMemoryBuffer* buffer = new TMemoryBuffer;
boost::shared_ptr<TTransport> trans(buffer);
TDebugProtocol protocol(trans);
@@ -181,8 +181,8 @@
#if 0
template<typename Object>
std::string DebugString(const std::vector<Object>& vec) {
- using namespace facebook::thrift::transport;
- using namespace facebook::thrift::protocol;
+ using namespace apache::thrift::transport;
+ using namespace apache::thrift::protocol;
TMemoryBuffer* buffer = new TMemoryBuffer;
boost::shared_ptr<TTransport> trans(buffer);
TDebugProtocol protocol(trans);
@@ -205,7 +205,7 @@
}
#endif // 0
-}} // facebook::thrift
+}} // apache::thrift
#endif // #ifndef _THRIFT_PROTOCOL_TDEBUGPROTOCOL_H_
Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TDenseProtocol.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TDenseProtocol.cpp?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TDenseProtocol.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TDenseProtocol.cpp Sat Jan 31 22:36:20 2009
@@ -104,10 +104,10 @@
#define UNLIKELY(val) (val)
#endif
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
const int TDenseProtocol::FP_PREFIX_LEN =
- facebook::thrift::reflection::local::FP_PREFIX_LEN;
+ apache::thrift::reflection::local::FP_PREFIX_LEN;
// Top TypeSpec. TypeSpec of the structure being encoded.
#define TTS (ts_stack_.back()) // type = TypeSpec*
@@ -746,4 +746,4 @@
return xfer + readStringBody(str, size);
}
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TDenseProtocol.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TDenseProtocol.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TDenseProtocol.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TDenseProtocol.h Sat Jan 31 22:36:20 2009
@@ -9,7 +9,7 @@
#include "TBinaryProtocol.h"
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
/**
* !!!WARNING!!!
@@ -51,7 +51,7 @@
static const int32_t VERSION_2 = 0x80020000;
public:
- typedef facebook::thrift::reflection::local::TypeSpec TypeSpec;
+ typedef apache::thrift::reflection::local::TypeSpec TypeSpec;
static const int FP_PREFIX_LEN;
/**
@@ -236,6 +236,6 @@
bool standalone_;
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
#endif // #ifndef _THRIFT_PROTOCOL_TDENSEPROTOCOL_H_
Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TJSONProtocol.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TJSONProtocol.cpp?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TJSONProtocol.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TJSONProtocol.cpp Sat Jan 31 22:36:20 2009
@@ -11,9 +11,9 @@
#include "TBase64Utils.h"
#include <transport/TTransportException.h>
-using namespace facebook::thrift::transport;
+using namespace apache::thrift::transport;
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
// Static data
@@ -874,7 +874,7 @@
// Check if we hit the end of the list
uint8_t ch = reader_.peek();
if (ch == kJSONObjectEnd) {
- fieldType = facebook::thrift::protocol::T_STOP;
+ fieldType = apache::thrift::protocol::T_STOP;
}
else {
uint64_t tmpVal = 0;
@@ -982,4 +982,4 @@
return readJSONBase64(str);
}
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TJSONProtocol.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TJSONProtocol.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TJSONProtocol.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TJSONProtocol.h Sat Jan 31 22:36:20 2009
@@ -11,7 +11,7 @@
#include <stack>
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
// Forward declaration
class TJSONContext;
@@ -299,18 +299,18 @@
}
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
// TODO(dreiss): Move part of ThriftJSONString into a .cpp file and remove this.
#include <transport/TBufferTransports.h>
-namespace facebook { namespace thrift {
+namespace apache { namespace thrift {
template<typename ThriftStruct>
std::string ThriftJSONString(const ThriftStruct& ts) {
- using namespace facebook::thrift::transport;
- using namespace facebook::thrift::protocol;
+ using namespace apache::thrift::transport;
+ using namespace apache::thrift::protocol;
TMemoryBuffer* buffer = new TMemoryBuffer;
boost::shared_ptr<TTransport> trans(buffer);
TJSONProtocol protocol(trans);
@@ -323,6 +323,6 @@
return std::string((char*)buf, (unsigned int)size);
}
-}} // facebook::thrift
+}} // apache::thrift
#endif // #define _THRIFT_PROTOCOL_TJSONPROTOCOL_H_ 1
Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TOneWayProtocol.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TOneWayProtocol.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TOneWayProtocol.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TOneWayProtocol.h Sat Jan 31 22:36:20 2009
@@ -9,7 +9,7 @@
#include "TProtocol.h"
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
/**
* Abstract class for implementing a protocol that can only be written,
@@ -288,6 +288,6 @@
std::string subclass_;
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
#endif // #ifndef _THRIFT_PROTOCOL_TBINARYPROTOCOL_H_
Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TProtocol.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TProtocol.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TProtocol.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TProtocol.h Sat Jan 31 22:36:20 2009
@@ -17,9 +17,9 @@
#include <string>
#include <map>
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
-using facebook::thrift::transport::TTransport;
+using apache::thrift::transport::TTransport;
#ifdef HAVE_ENDIAN_H
#include <endian.h>
@@ -352,6 +352,6 @@
virtual boost::shared_ptr<TProtocol> getProtocol(boost::shared_ptr<TTransport> trans) = 0;
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
#endif // #define _THRIFT_PROTOCOL_TPROTOCOL_H_ 1
Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TProtocolException.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TProtocolException.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TProtocolException.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TProtocolException.h Sat Jan 31 22:36:20 2009
@@ -9,7 +9,7 @@
#include <string>
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
/**
* Class to encapsulate all the possible types of protocol errors that may
@@ -20,7 +20,7 @@
*
* @author Mark Slee <mc...@facebook.com>
*/
-class TProtocolException : public facebook::thrift::TException {
+class TProtocolException : public apache::thrift::TException {
public:
/**
@@ -36,19 +36,19 @@
};
TProtocolException() :
- facebook::thrift::TException(),
+ apache::thrift::TException(),
type_(UNKNOWN) {}
TProtocolException(TProtocolExceptionType type) :
- facebook::thrift::TException(),
+ apache::thrift::TException(),
type_(type) {}
TProtocolException(const std::string& message) :
- facebook::thrift::TException(message),
+ apache::thrift::TException(message),
type_(UNKNOWN) {}
TProtocolException(TProtocolExceptionType type, const std::string& message) :
- facebook::thrift::TException(message),
+ apache::thrift::TException(message),
type_(type) {}
virtual ~TProtocolException() throw() {}
@@ -87,6 +87,6 @@
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
#endif // #ifndef _THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_
Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TProtocolTap.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TProtocolTap.h?rev=739644&r1=739643&r2=739644&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TProtocolTap.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TProtocolTap.h Sat Jan 31 22:36:20 2009
@@ -9,9 +9,9 @@
#include <protocol/TOneWayProtocol.h>
-namespace facebook { namespace thrift { namespace protocol {
+namespace apache { namespace thrift { namespace protocol {
-using facebook::thrift::transport::TTransport;
+using apache::thrift::transport::TTransport;
/**
* Puts a wiretap on a protocol object. Any reads to this class are passed
@@ -170,6 +170,6 @@
boost::shared_ptr<TProtocol> sink_;
};
-}}} // facebook::thrift::protocol
+}}} // apache::thrift::protocol
#endif // #define _THRIFT_PROTOCOL_TPROTOCOLTAP_H_ 1