| #import "TProtocolUtil.h" |
| @implementation TProtocolUtil |
| + (void) skipType: (int) type onProtocol: (id <TProtocol>) protocol |
| [protocol readStructBeginReturningName: NULL]; |
| [protocol readFieldBeginReturningName: nil type: &fieldType fieldID: nil]; |
| if (fieldType == TType_STOP) { |
| [TProtocolUtil skipType: fieldType onProtocol: protocol]; |
| [protocol readStructEnd]; |
| [protocol readMapBeginReturningKeyType: &keyType valueType: &valueType size: &size]; |
| for (i = 0; i < size; i++) { |
| [TProtocolUtil skipType: keyType onProtocol: protocol]; |
| [TProtocolUtil skipType: valueType onProtocol: protocol]; |
| [protocol readSetBeginReturningElementType: &elemType size: &size]; |
| for (i = 0; i < size; i++) { |
| [TProtocolUtil skipType: elemType onProtocol: protocol]; |
| [protocol readListBeginReturningElementType: &elemType size: &size]; |
| for (i = 0; i < size; i++) { |
| [TProtocolUtil skipType: elemType onProtocol: protocol]; |