MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / findStringKeyField

Function findStringKeyField

tools/flatbuffers_backed_impl.cc:158–165  ·  view source on GitHub ↗

Detects a "key" field of the type string.

Source from the content-addressed store, hash-verified

156
157// Detects a "key" field of the type string.
158const reflection::Field* findStringKeyField(const reflection::Object& object) {
159 for (const auto field : *object.fields()) {
160 if (field->key() && field->type()->base_type() == reflection::String) {
161 return field;
162 }
163 }
164 return nullptr;
165}
166
167} // namespace
168

Callers 1

operator[]Method · 0.85

Calls 2

keyMethod · 0.80
typeMethod · 0.80

Tested by

no test coverage detected