MCPcopy Create free account
hub / github.com/apache/thrift / readSetBegin

Method readSetBegin

lib/cpp/src/thrift/protocol/TJSONProtocol.cpp:1059–1074  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1057}
1058
1059uint32_t TJSONProtocol::readSetBegin(TType& elemType, uint32_t& size) {
1060 uint64_t tmpVal = 0;
1061 std::string tmpStr;
1062 uint32_t result = readJSONArrayStart();
1063 result += readJSONString(tmpStr);
1064 elemType = getTypeIDForTypeName(tmpStr);
1065 result += readJSONInteger(tmpVal);
1066 if (tmpVal > (std::numeric_limits<uint32_t>::max)())
1067 throw TProtocolException(TProtocolException::SIZE_LIMIT);
1068 size = static_cast<uint32_t>(tmpVal);
1069
1070 TSet set(elemType, size);
1071 checkReadBytesAvailable(set);
1072
1073 return result;
1074}
1075
1076uint32_t TJSONProtocol::readSetEnd() {
1077 return readJSONArrayEnd();

Callers

nothing calls this directly

Calls 2

getTypeIDForTypeNameFunction · 0.85
TProtocolExceptionClass · 0.70

Tested by

no test coverage detected