Lines Matching refs:key_field
622 std::string GenGetterForLookupByKey(flatbuffers::FieldDef *key_field, in GenGetterForLookupByKey() argument
625 auto type = key_field->value.type; in GenGetterForLookupByKey()
632 getter = dest_cast + getter + "(" + GenOffsetGetter(key_field, num) + ")" + in GenGetterForLookupByKey()
723 std::string GenOffsetGetter(flatbuffers::FieldDef *key_field, in GenOffsetGetter() argument
727 NumToString(key_field->value.offset) + ", "; in GenOffsetGetter()
740 std::string GenLookupKeyGetter(flatbuffers::FieldDef *key_field) const { in GenLookupKeyGetter()
745 if (key_field->value.type.base_type == BASE_TYPE_STRING) { in GenLookupKeyGetter()
748 key_getter += GenOffsetGetter(key_field); in GenLookupKeyGetter()
751 auto get_val = GenGetterForLookupByKey(key_field, "bb"); in GenLookupKeyGetter()
755 key_getter += GenTypeNameDest(key_field->value.type) + " val = "; in GenLookupKeyGetter()
763 std::string GenKeyGetter(flatbuffers::FieldDef *key_field) const { in GenKeyGetter()
767 if (key_field->value.type.base_type == BASE_TYPE_STRING) { in GenKeyGetter()
771 key_getter += GenOffsetGetter(key_field, "o1") + ", "; in GenKeyGetter()
772 key_getter += GenOffsetGetter(key_field, "o2") + ", " + data_buffer + ")"; in GenKeyGetter()
775 auto field_getter = GenGetterForLookupByKey(key_field, data_buffer, "o1"); in GenKeyGetter()
778 field_getter = GenGetterForLookupByKey(key_field, data_buffer, "o2"); in GenKeyGetter()
782 "\n " + GenTypeNameDest(key_field->value.type) + " val_1 = "; in GenKeyGetter()
784 field_getter + ";\n " + GenTypeNameDest(key_field->value.type); in GenKeyGetter()
786 field_getter = GenGetterForLookupByKey(key_field, data_buffer, "o2"); in GenKeyGetter()
1090 auto &key_field = **kit; in GenStruct() local
1091 if (key_field.key) { in GenStruct()
1095 code += GenTypeNameDest(key_field.value.type) + " key)"; in GenStruct()
1107 code += GenTypeNameDest(key_field.value.type) + " key)"; in GenStruct()
1255 flatbuffers::FieldDef *key_field = nullptr; in GenStruct() local
1346 if (field.key) key_field = &field; in GenStruct()
1460 code += GenKeyGetter(key_field); in GenStruct()
1470 GenKeyGetter(key_field); in GenStruct()
1480 code += GenTypeNameDest(key_field->value.type); in GenStruct()
1482 if (key_field->value.type.base_type == BASE_TYPE_STRING) { in GenStruct()
1494 code += GenLookupKeyGetter(key_field); in GenStruct()