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

Method writeFieldBegin

lib/cpp/src/thrift/protocol/TDebugProtocol.cpp:219–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219uint32_t TDebugProtocol::writeFieldBegin(const char* name,
220 const TType fieldType,
221 const int16_t fieldId) {
222 // sprintf(id_str, "%02d", fieldId);
223 string id_str = to_string(fieldId);
224 if (id_str.length() == 1)
225 id_str = '0' + id_str;
226
227 return writeIndented(id_str + ": " + name + " (" + fieldTypeName(fieldType) + ") = ");
228}
229
230uint32_t TDebugProtocol::writeFieldEnd() {
231 assert(write_state_.back() == STRUCT);

Callers

nothing calls this directly

Calls 2

lengthMethod · 0.65
to_stringFunction · 0.50

Tested by

no test coverage detected