return result;
}
+
+ // Given a field on an IDL class, returns the name of the field
+ // on the linked class that acts as the selector for the linked class.
+ // Returns null if no selector is found or the field is not a link.
+ getLinkSelector(fmClass: string, field: string): string {
+ const fieldDef = this.classes[fmClass].field_map[field];
+ if (fieldDef.class) {
+ const classDef = this.classes[fieldDef.class];
+ if (classDef.pkey) {
+ return classDef.field_map[classDef.pkey].selector || null;
+ }
+ }
+ return null;
+ }
}