| 3618 | } |
| 3619 | |
| 3620 | void writeLazyMap(ThriftBinaryBufferWriter& w, const LazyMap& s) { |
| 3621 | w.writeStructBegin("LazyMap"); |
| 3622 | if(s.keysOnly.isSet()) { |
| 3623 | w.writeFieldBegin("keysOnly", ThriftFieldType::T_SET, 1); |
| 3624 | w.writeSetBegin(ThriftFieldType::T_STRING, s.keysOnly.ref().count()); |
| 3625 | Q_FOREACH(const QString& elem, s.keysOnly.ref()) { |
| 3626 | w.writeString(elem); |
| 3627 | } |
| 3628 | w.writeSetEnd(); |
| 3629 | w.writeFieldEnd(); |
| 3630 | } |
| 3631 | if(s.fullMap.isSet()) { |
| 3632 | w.writeFieldBegin("fullMap", ThriftFieldType::T_MAP, 2); |
| 3633 | w.writeMapBegin(ThriftFieldType::T_STRING, ThriftFieldType::T_STRING, s.fullMap.ref().keys().length()); |
| 3634 | Q_FOREACH(const QString& elem, s.fullMap.ref().keys()) { |
| 3635 | w.writeString(elem); |
| 3636 | w.writeString(s.fullMap.ref().value(elem)); |
| 3637 | } |
| 3638 | w.writeMapEnd(); |
| 3639 | w.writeFieldEnd(); |
| 3640 | } |
| 3641 | w.writeFieldStop(); |
| 3642 | w.writeStructEnd(); |
| 3643 | } |
| 3644 | |
| 3645 | void readLazyMap(ThriftBinaryBufferReader& r, LazyMap& s) { |
| 3646 | QString fname; |
no test coverage detected