MCPcopy Create free account
hub / github.com/defold/defold / ReadField

Method ReadField

engine/ddf/src/ddf/ddf_message.cpp:216–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214 }
215
216 Result Message::ReadField(LoadContext* load_context,
217 WireType wire_type,
218 const FieldDescriptor* field,
219 InputBuffer* input_buffer)
220 {
221 if ((Type) field->m_Type == TYPE_MESSAGE)
222 {
223 return ReadMessageField(load_context, wire_type, field, input_buffer);
224 }
225 else if ((Type) field->m_Type == TYPE_STRING)
226 {
227 return ReadStringField(load_context, wire_type, field, input_buffer);
228 }
229 else if ((Type) field->m_Type == TYPE_BYTES)
230 {
231 return ReadBytesField(load_context, wire_type, field, input_buffer);
232 }
233 else
234 {
235 // Assume scalar type
236 return ReadScalarField(load_context, wire_type, field, input_buffer);
237 }
238 }
239
240 void Message::SetOneOf(const Descriptor* desc, const FieldDescriptor* field)
241 {

Callers 1

DoLoadMessageFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected