/*** Autogenerated by Thrift Compiler (0.9.2)** DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING* @generated*/#include "HelloWordService.h"HelloWordService_doAction_args::~HelloWordService_doAction_args() throw() {}uint32_t HelloWordService_doAction_args::read(::apache::thrift::protocol::TProtocol* iprot) {uint32_t xfer = 0;std::string fname;::apache::thrift::protocol::TType ftype;int16_t fid;xfer += iprot->readStructBegin(fname);using ::apache::thrift::protocol::TProtocolException;while (true){xfer += iprot->readFieldBegin(fname, ftype, fid);if (ftype == ::apache::thrift::protocol::T_STOP) {break;}switch (fid){case 1:if (ftype == ::apache::thrift::protocol::T_STRUCT) {xfer += this->request.read(iprot);this->__isset.request = true;} else {xfer += iprot->skip(ftype);}break;default:xfer += iprot->skip(ftype);break;}xfer += iprot->readFieldEnd();}xfer += iprot->readStructEnd();return xfer;}uint32_t HelloWordService_doAction_args::write(::apache::thrift::protocol::TProtocol* oprot) const {uint32_t xfer = 0;oprot->incrementRecursionDepth();xfer += oprot->writeStructBegin("HelloWordService_doAction_args");xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1);xfer += this->request.write(oprot);xfer += oprot->writeFieldEnd();xfer += oprot->writeFieldStop();xfer += oprot->writeStructEnd();oprot->decrementRecursionDepth();return xfer;}HelloWordService_doAction_pargs::~HelloWordService_doAction_pargs() throw() {}uint32_t HelloWordService_doAction_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {uint32_t xfer = 0;oprot->incrementRecursionDepth();xfer += oprot->writeStructBegin("HelloWordService_doAction_pargs");xfer += oprot->writeFieldBegin("request", ::apache::thrift::protocol::T_STRUCT, 1);xfer += (*(this->request)).write(oprot);xfer += oprot->writeFieldEnd();xfer += oprot->writeFieldStop();xfer += oprot->writeStructEnd();oprot->decrementRecursionDepth();return xfer;}HelloWordService_doAction_result::~HelloWordService_doAction_result() throw() {}uint32_t HelloWordService_doAction_result::read(::apache::thrift::protocol::TProtocol* iprot) {uint32_t xfer = 0;std::string fname;::apache::thrift::protocol::TType ftype;int16_t fid;xfer += iprot->readStructBegin(fname);using ::apache::thrift::protocol::TProtocolException;while (true){xfer += iprot->readFieldBegin(fname, ftype, fid);if (ftype == ::apache::thrift::protocol::T_STOP) {break;}switch (fid){case 0:if (ftype == ::apache::thrift::protocol::T_STRING) {xfer += iprot->readString(this->success);this->__isset.success = true;} else {xfer += iprot->skip(ftype);}break;case 1:if (ftype == ::apache::thrift::protocol::T_STRUCT) {xfer += this->qe.read(iprot);this->__isset.qe = true;} else {xfer += iprot->skip(ftype);}break;default:xfer += iprot->skip(ftype);break;}xfer += iprot->readFieldEnd();}xfer += iprot->readStructEnd();return xfer;}uint32_t HelloWordService_doAction_result::write(::apache::thrift::protocol::TProtocol* oprot) const {uint32_t xfer = 0;xfer += oprot->writeStructBegin("HelloWordService_doAction_result");if (this->__isset.success) {xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0);xfer += oprot->writeString(this->success);xfer += oprot->writeFieldEnd();} else if (this->__isset.qe) {xfer += oprot->writeFieldBegin("qe", ::apache::thrift::protocol::T_STRUCT, 1);xfer += this->qe.write(oprot);xfer += oprot->writeFieldEnd();}xfer += oprot->writeFieldStop();xfer += oprot->writeStructEnd();return xfer;}HelloWordService_doAction_presult::~HelloWordService_doAction_presult() throw() {}uint32_t HelloWordService_doAction_presult::read(::apache::thrift::protocol::TProtocol* iprot) {uint32_t xfer = 0;std::string fname;::apache::thrift::protocol::TType ftype;int16_t fid;xfer += iprot->readStructBegin(fname);using ::apache::thrift::protocol::TProtocolException;while (true){xfer += iprot->readFieldBegin(fname, ftype, fid);if (ftype == ::apache::thrift::protocol::T_STOP) {break;}switch (fid){case 0:if (ftype == ::apache::thrift::protocol::T_STRING) {xfer += iprot->readString((*(this->success)));this->__isset.success = true;} else {xfer += iprot->skip(ftype);}break;case 1:if (ftype == ::apache::thrift::protocol::T_STRUCT) {xfer += this->qe.read(iprot);this->__isset.qe = true;} else {xfer += iprot->skip(ftype);}break;default:xfer += iprot->skip(ftype);break;}xfer += iprot->readFieldEnd();}xfer += iprot->readStructEnd();return xfer;}void HelloWordServiceClient::doAction(std::string& _return, const Request& request){send_doAction(request);recv_doAction(_return);}void HelloWordServiceClient::send_doAction(const Request& request){int32_t cseqid = 0;oprot_->writeMessageBegin("doAction", ::apache::thrift::protocol::T_CALL, cseqid);HelloWordService_doAction_pargs args;args.request = &request;args.write(oprot_);oprot_->writeMessageEnd();oprot_->getTransport()->writeEnd();oprot_->getTransport()->flush();}void HelloWordServiceClient::recv_doAction(std::string& _return){int32_t rseqid = 0;std::string fname;::apache::thrift::protocol::TMessageType mtype;iprot_->readMessageBegin(fname, mtype, rseqid);if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {::apache::thrift::TApplicationException x;x.read(iprot_);iprot_->readMessageEnd();iprot_->getTransport()->readEnd();throw x;}if (mtype != ::apache::thrift::protocol::T_REPLY) {iprot_->skip(::apache::thrift::protocol::T_STRUCT);iprot_->readMessageEnd();iprot_->getTransport()->readEnd();}if (fname.compare("doAction") != 0) {iprot_->skip(::apache::thrift::protocol::T_STRUCT);iprot_->readMessageEnd();iprot_->getTransport()->readEnd();}HelloWordService_doAction_presult result;result.success = &_return;result.read(iprot_);iprot_->readMessageEnd();iprot_->getTransport()->readEnd();if (result.__isset.success) {// _return pointer has now been filledreturn;}if (result.__isset.qe) {throw result.qe;}throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "doAction failed: unknown result");}bool HelloWordServiceProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) {ProcessMap::iterator pfn;pfn = processMap_.find(fname);if (pfn == processMap_.end()) {iprot->skip(::apache::thrift::protocol::T_STRUCT);iprot->readMessageEnd();iprot->getTransport()->readEnd();::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::UNKNOWN_METHOD, "Invalid method name: '"+fname+"'");oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid);x.write(oprot);oprot->writeMessageEnd();oprot->getTransport()->writeEnd();oprot->getTransport()->flush();return true;}(this->*(pfn->second))(seqid, iprot, oprot, callContext);return true;}void HelloWordServiceProcessor::process_doAction(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext){void* ctx = NULL;if (this->eventHandler_.get() != NULL) {ctx = this->eventHandler_->getContext("HelloWordService.doAction", callContext);}::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "HelloWordService.doAction");if (this->eventHandler_.get() != NULL) {this->eventHandler_->preRead(ctx, "HelloWordService.doAction");}HelloWordService_doAction_args args;args.read(iprot);iprot->readMessageEnd();uint32_t bytes = iprot->getTransport()->readEnd();if (this->eventHandler_.get() != NULL) {this->eventHandler_->postRead(ctx, "HelloWordService.doAction", bytes);}HelloWordService_doAction_result result;try {iface_->doAction(result.success, args.request);result.__isset.success = true;} catch (RequestException &qe) {result.qe = qe;result.__isset.qe = true;} catch (const std::exception& e) {if (this->eventHandler_.get() != NULL) {this->eventHandler_->handlerError(ctx, "HelloWordService.doAction");}::apache::thrift::TApplicationException x(e.what());oprot->writeMessageBegin("doAction", ::apache::thrift::protocol::T_EXCEPTION, seqid);x.write(oprot);oprot->writeMessageEnd();oprot->getTransport()->writeEnd();oprot->getTransport()->flush();return;}if (this->eventHandler_.get() != NULL) {this->eventHandler_->preWrite(ctx, "HelloWordService.doAction");}oprot->writeMessageBegin("doAction", ::apache::thrift::protocol::T_REPLY, seqid);result.write(oprot);oprot->writeMessageEnd();bytes = oprot->getTransport()->writeEnd();oprot->getTransport()->flush();if (this->eventHandler_.get() != NULL) {this->eventHandler_->postWrite(ctx, "HelloWordService.doAction", bytes);}}::boost::shared_ptr< ::apache::thrift::TProcessor > HelloWordServiceProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) {::apache::thrift::ReleaseHandler< HelloWordServiceIfFactory > cleanup(handlerFactory_);::boost::shared_ptr< HelloWordServiceIf > handler(handlerFactory_->getHandler(connInfo), cleanup);::boost::shared_ptr< ::apache::thrift::TProcessor > processor(new HelloWordServiceProcessor(handler));return processor;}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。