Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- t_cpp_generator.cc.bak 2011-11-26 14:00:48.000000000 -0500
- +++ t_cpp_generator.cc 2012-05-09 11:01:58.000000000 -0400
- @@ -2696,7 +2696,7 @@
- f_header_ <<
- indent() << "boost::shared_ptr<" << if_name_ << "> iface_;" << endl;
- f_header_ <<
- - indent() << "virtual " << ret_type_ << "process_fn(" << finish_cob_ << "apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid" << call_context_ << ");" << endl;
- + indent() << "virtual " << ret_type_ << "process_fn(" << finish_cob_ << "::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid" << call_context_ << ");" << endl;
- indent_down();
- // Process function declarations
- @@ -2706,12 +2706,12 @@
- f_header_ <<
- indent() << "std::map<std::string, void (" <<
- class_name_ << "::*)(" << finish_cob_decl_ <<
- - "int32_t, apache::thrift::protocol::TProtocol*, " <<
- - "apache::thrift::protocol::TProtocol*" << call_context_decl_ <<
- + "int32_t, ::apache::thrift::protocol::TProtocol*, " <<
- + "::apache::thrift::protocol::TProtocol*" << call_context_decl_ <<
- ")> processMap_;" << endl;
- for (f_iter = functions.begin(); f_iter != functions.end(); ++f_iter) {
- indent(f_header_) <<
- - "void process_" << (*f_iter)->get_name() << "(" << finish_cob_ << "int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot" << call_context_ << ");" << endl;
- + "void process_" << (*f_iter)->get_name() << "(" << finish_cob_ << "int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot" << call_context_ << ");" << endl;
- if (generator_->gen_templates_) {
- indent(f_header_) <<
- "void process_" << (*f_iter)->get_name() << "(" << finish_cob_ <<
- @@ -2738,8 +2738,8 @@
- f_header_ <<
- indent() << "void throw_" << (*f_iter)->get_name() <<
- "(std::tr1::function<void(bool ok)> cob, int32_t seqid, " <<
- - "apache::thrift::protocol::TProtocol* oprot, void* ctx, " <<
- - "apache::thrift::TDelayedException* _throw);" << endl;
- + "::apache::thrift::protocol::TProtocol* oprot, void* ctx, " <<
- + "::apache::thrift::TDelayedException* _throw);" << endl;
- if (generator_->gen_templates_) {
- f_header_ <<
- indent() << "void throw_" << (*f_iter)->get_name() <<
- @@ -2783,7 +2783,7 @@
- declare_map <<
- indent() << "}" << endl <<
- endl <<
- - indent() << "virtual " << ret_type_ << "process(" << finish_cob_ << "boost::shared_ptr<apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr<apache::thrift::protocol::TProtocol> poprot" << call_context_ << ");" << endl <<
- + indent() << "virtual " << ret_type_ << "process(" << finish_cob_ << "boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot" << call_context_ << ");" << endl <<
- indent() << "virtual ~" << class_name_ <<
- "() {}" << endl;
- indent_down();
- @@ -2802,7 +2802,7 @@
- // template parameter here.
- f_header_ <<
- "typedef " << class_name_ <<
- - "<apache::thrift::protocol::TDummyProtocol> " <<
- + "< ::apache::thrift::protocol::TDummyProtocol> " <<
- service_name_ << pstyle_ << "Processor;" << endl << endl;
- }
- }
- @@ -2812,8 +2812,8 @@
- template_header_ <<
- ret_type_ << class_name_ <<
- template_suffix_ << "::process(" << finish_cob_ <<
- - "boost::shared_ptr<apache::thrift::protocol::TProtocol> piprot, " <<
- - "boost::shared_ptr<apache::thrift::protocol::TProtocol> poprot" <<
- + "boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, " <<
- + "boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot" <<
- call_context_ << ") {" << endl;
- indent_up();
- @@ -2855,8 +2855,8 @@
- template_header_ <<
- ret_type_ << class_name_ <<
- template_suffix_ << "::process_fn(" << finish_cob_ <<
- - "apache::thrift::protocol::TProtocol* iprot, " <<
- - "apache::thrift::protocol::TProtocol* oprot, " <<
- + " ::apache::thrift::protocol::TProtocol* iprot, " <<
- + " ::apache::thrift::protocol::TProtocol* oprot, " <<
- "std::string& fname, int32_t seqid" << call_context_ << ") {" << endl;
- indent_up();
- @@ -2864,13 +2864,13 @@
- f_out_ <<
- indent() << typename_str_ << "std::map<std::string, void (" <<
- class_name_ << "::*)(" << finish_cob_decl_ <<
- - "int32_t, apache::thrift::protocol::TProtocol*, " <<
- - "apache::thrift::protocol::TProtocol*" << call_context_decl_ << ")>::iterator pfn;" << endl <<
- + "int32_t, ::apache::thrift::protocol::TProtocol*, " <<
- + "::apache::thrift::protocol::TProtocol*" << call_context_decl_ << ")>::iterator pfn;" << endl <<
- indent() << "pfn = processMap_.find(fname);" << endl <<
- indent() << "if (pfn == processMap_.end()) {" << endl;
- if (extends_.empty()) {
- f_out_ <<
- - indent() << " iprot->skip(apache::thrift::protocol::T_STRUCT);" << endl <<
- + indent() << " iprot->skip(::apache::thrift::protocol::T_STRUCT);" << endl <<
- indent() << " iprot->readMessageEnd();" << endl <<
- indent() << " iprot->getTransport()->readEnd();" << endl <<
- indent() << " ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::UNKNOWN_METHOD, \"Invalid method name: '\"+fname+\"'\");" << endl <<
- @@ -3109,7 +3109,7 @@
- indent() << " ctx = this->eventHandler_->getContext(\"" <<
- service_func_name << "\", callContext);" << endl <<
- indent() << "}" << endl <<
- - indent() << "apache::thrift::TProcessorContextFreer freer(" <<
- + indent() << " ::apache::thrift::TProcessorContextFreer freer(" <<
- "this->eventHandler_.get(), ctx, \"" << service_func_name << "\");" <<
- endl << endl <<
- indent() << "if (this->eventHandler_.get() != NULL) {" << endl <<
- @@ -3202,10 +3202,10 @@
- if (!tfunction->is_oneway()) {
- out <<
- endl <<
- - indent() << "apache::thrift::TApplicationException x(e.what());" <<
- + indent() << " ::apache::thrift::TApplicationException x(e.what());" <<
- endl <<
- indent() << "oprot->writeMessageBegin(\"" << tfunction->get_name() <<
- - "\", apache::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
- + "\", ::apache::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
- indent() << "x.write(oprot);" << endl <<
- indent() << "oprot->writeMessageEnd();" << endl <<
- indent() << "oprot->getTransport()->writeEnd();" << endl <<
- @@ -3236,7 +3236,7 @@
- service_func_name << "\");" << endl <<
- indent() << "}" << endl << endl <<
- indent() << "oprot->writeMessageBegin(\"" << tfunction->get_name() <<
- - "\", apache::thrift::protocol::T_REPLY, seqid);" << endl <<
- + "\", ::apache::thrift::protocol::T_REPLY, seqid);" << endl <<
- indent() << "result.write(oprot);" << endl <<
- indent() << "oprot->writeMessageEnd();" << endl <<
- indent() << "bytes = oprot->getTransport()->writeEnd();" << endl <<
- @@ -3298,7 +3298,7 @@
- indent() << " ctx = this->eventHandler_->getContext(\"" <<
- service_func_name << "\", NULL);" << endl <<
- indent() << "}" << endl <<
- - indent() << "apache::thrift::TProcessorContextFreer freer(" <<
- + indent() << " ::apache::thrift::TProcessorContextFreer freer(" <<
- "this->eventHandler_.get(), ctx, \"" << service_func_name << "\");" <<
- endl << endl <<
- indent() << "try {" << endl;
- @@ -3452,7 +3452,7 @@
- indent() << " ctx = this->eventHandler_->getContext(\"" <<
- service_func_name << "\", NULL);" << endl <<
- indent() << "}" << endl <<
- - indent() << "apache::thrift::TProcessorContextFreer freer(" <<
- + indent() << " ::apache::thrift::TProcessorContextFreer freer(" <<
- "this->eventHandler_.get(), ctx, \"" << service_func_name <<
- "\");" << endl << endl <<
- indent() << "if (this->eventHandler_.get() != NULL) {" << endl <<
- @@ -3460,7 +3460,7 @@
- service_func_name << "\");" << endl <<
- indent() << "}" << endl << endl <<
- indent() << "oprot->writeMessageBegin(\"" << tfunction->get_name() <<
- - "\", apache::thrift::protocol::T_REPLY, seqid);" << endl <<
- + "\", ::apache::thrift::protocol::T_REPLY, seqid);" << endl <<
- indent() << "result.write(oprot);" << endl <<
- indent() << "oprot->writeMessageEnd();" << endl <<
- indent() << "uint32_t bytes = oprot->getTransport()->writeEnd();" <<
- @@ -3510,7 +3510,7 @@
- indent() << " ctx = this->eventHandler_->getContext(\"" <<
- service_func_name << "\", NULL);" << endl <<
- indent() << "}" << endl <<
- - indent() << "apache::thrift::TProcessorContextFreer freer(" <<
- + indent() << " ::apache::thrift::TProcessorContextFreer freer(" <<
- "this->eventHandler_.get(), ctx, \"" << service_func_name << "\");" <<
- endl << endl;
- @@ -3547,10 +3547,10 @@
- service_func_name << "\");" << endl <<
- indent() << "}" << endl <<
- endl <<
- - indent() << "apache::thrift::TApplicationException x(e.what());" <<
- + indent() << " ::apache::thrift::TApplicationException x(e.what());" <<
- endl <<
- indent() << "oprot->writeMessageBegin(\"" << tfunction->get_name() <<
- - "\", apache::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
- + "\", ::apache::thrift::protocol::T_EXCEPTION, seqid);" << endl <<
- indent() << "x.write(oprot);" << endl <<
- indent() << "oprot->writeMessageEnd();" << endl <<
- indent() << "oprot->getTransport()->writeEnd();" << endl <<
- @@ -3568,7 +3568,7 @@
- service_func_name << "\");" << endl <<
- indent() << "}" << endl << endl <<
- indent() << "oprot->writeMessageBegin(\"" << tfunction->get_name() <<
- - "\", apache::thrift::protocol::T_REPLY, seqid);" << endl <<
- + "\", ::apache::thrift::protocol::T_REPLY, seqid);" << endl <<
- indent() << "result.write(oprot);" << endl <<
- indent() << "oprot->writeMessageEnd();" << endl <<
- indent() << "uint32_t bytes = oprot->getTransport()->writeEnd();" <<
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement