MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / GetAnyFieldS

Function GetAnyFieldS

native/thirdpart/flatbuffers/reflection.h:203–210  ·  view source on GitHub ↗

Get any table field as a string, regardless of what type it is. You may pass nullptr for the schema if you don't care to have fields that are of table type pretty-printed.

Source from the content-addressed store, hash-verified

201// You may pass nullptr for the schema if you don't care to have fields that
202// are of table type pretty-printed.
203inline std::string GetAnyFieldS(const Table &table,
204 const reflection::Field &field,
205 const reflection::Schema *schema) {
206 auto field_ptr = table.GetAddressOf(field.offset());
207 return field_ptr ? GetAnyValueS(field.type()->base_type(), field_ptr, schema,
208 field.type()->index())
209 : "";
210}
211
212// Get any struct field as a 64bit int, regardless of what type it is.
213inline int64_t GetAnyFieldI(const Struct &st, const reflection::Field &field) {

Callers 1

GetAnyValueSFunction · 0.85

Calls 2

GetAnyValueSFunction · 0.85
GetAddressOfMethod · 0.80

Tested by

no test coverage detected