ːJc@svddkTddklZlZdefdYZdd dYZdefdYZd d d YZd S(i(t*(tpacktunpacktTBinaryProtocolcBseZdZdZdZdZeedZdZ dZ dZ dZ d Z d Zd Zd Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#d Z$d!Z%d"Z&d#Z'd$Z(d%Z)d&Z*d'Z+d(Z,d)Z-d*Z.d+Z/RS(,s4Binary implementation of the Thrift protocol driver.iiicCs&ti||||_||_dS(N(t TProtocolBaset__init__t strictReadt strictWrite(tselfttransRR((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyR's cCsg|io2|iti|B|i||i|n(|i||i||i|dS(N(RtwriteI32Rt VERSION_1t writeStringt writeByte(Rtnamettypetseqid((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pytwriteMessageBegin,s    cCsdS(N((R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pytwriteMessageEnd6scCsdS(N((RR((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pytwriteStructBegin9scCsdS(N((R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pytwriteStructEnd<scCs|i||i|dS(N(R twriteI16(RRRtid((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pytwriteFieldBegin?s cCsdS(N((R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt writeFieldEndCscCs|itidS(N(R tTTypetSTOP(R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pytwriteFieldStopFscCs+|i||i||i|dS(N(R R (Rtktypetvtypetsize((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt writeMapBeginIs  cCsdS(N((R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt writeMapEndNscCs|i||i|dS(N(R R (RtetypeR((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pytwriteListBeginQs cCsdS(N((R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt writeListEndUscCs|i||i|dS(N(R R (RR!R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt writeSetBeginXs cCsdS(N((R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt writeSetEnd\scCs)|o|idn|iddS(Nii(R (Rtbool((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt writeBool_scCs#td|}|ii|dS(Ns!b(RR twrite(Rtbytetbuff((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyR escCs#td|}|ii|dS(Ns!h(RR R((Rti16R*((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyRiscCs#td|}|ii|dS(Ns!i(RR R((Rti32R*((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyR mscCs#td|}|ii|dS(Ns!q(RR R((Rti64R*((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pytwriteI64qscCs#td|}|ii|dS(Ns!d(RR R((RtdubR*((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt writeDoubleuscCs'|it||ii|dS(N(R tlenR R((Rtstr((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyR yscCs|i}|djo`|ti@}|tijottid|n|ti@}|i}|i}nK|iottidn|i i |}|i }|i}|||fS(Nis#Bad version in readMessageBegin: %dsNo protocol version header( treadI32Rt VERSION_MASKR tTProtocolExceptiont BAD_VERSIONt TYPE_MASKt readStringRR treadAlltreadByte(RtsztversionRRR((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pytreadMessageBegin}s        cCsdS(N((R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pytreadMessageEndscCsdS(N((R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pytreadStructBeginscCsdS(N((R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt readStructEndscCsF|i}|tijod|dfSn|i}d||fS(Ni(R:RRtNonetreadI16(RRR((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pytreadFieldBegins   cCsdS(N((R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt readFieldEndscCs1|i}|i}|i}|||fS(N(R:R3(RRRR((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt readMapBegins   cCsdS(N((R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt readMapEndscCs"|i}|i}||fS(N(R:R3(RR!R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt readListBegins  cCsdS(N((R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt readListEndscCs"|i}|i}||fS(N(R:R3(RR!R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt readSetBegins  cCsdS(N((R((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt readSetEndscCs%|i}|djotSntS(Ni(R:tFalsetTrue(RR)((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pytreadBools  cCs(|iid}td|\}|S(Nis!b(R R9R(RR*tval((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyR:scCs(|iid}td|\}|S(Nis!h(R R9R(RR*RN((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyRBscCs(|iid}td|\}|S(Nis!i(R R9R(RR*RN((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyR3scCs(|iid}td|\}|S(Nis!q(R R9R(RR*RN((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pytreadI64scCs(|iid}td|\}|S(Nis!d(R R9R(RR*RN((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt readDoublescCs"|i}|ii|}|S(N(R3R R9(RR1R2((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyR8s (0t__name__t __module__t__doc__R4R R7RKRLRRRRRRRRRR R"R#R$R%R'R RR R.R0R R=R>R?R@RCRDRERFRGRHRIRJRMR:RBR3RORPR8(((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyRsX                                     tTBinaryProtocolFactorycBs eZeedZdZRS(cCs||_||_dS(N(RR(RRR((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyRs cCst||i|i}|S(N(RRR(RR tprot((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyt getProtocols(RQRRRKRLRRV(((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyRTstTBinaryProtocolAcceleratedcBseZdZRS(sPC-Accelerated version of TBinaryProtocol. This class does not override any of TBinaryProtocol's methods, but the generated code recognizes it directly and will call into our C module to do the encoding, bypassing this object entirely. We inherit from TBinaryProtocol so that the normal TBinaryProtocol encoding can happen if the fastbinary module doesn't work for some reason. (TODO(dreiss): Make this happen sanely in more cases.) In order to take advantage of the C module, just use TBinaryProtocolAccelerated instead of TBinaryProtocol. NOTE: This code was contributed by an external developer. The internal Thrift team has reviewed and tested it, but we cannot guarantee that it is production-ready. Please feel free to report bugs and/or success stories to the public mailing list. (RQRRRS(((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyRWst!TBinaryProtocolAcceleratedFactorycBseZdZRS(cCs t|S(N(RW(RR ((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyRVs(RQRRRV(((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyRXsN((( t TProtocoltstructRRRRRTRWRX(((sx/Users/alerner/Development/ruby/mine/poolparty/examples/thrift/../../lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyss