UNPKG

ifc-expressions

Version:

Parsing and evaluation of IFC expressions

30 lines (29 loc) 1.17 kB
import { isObjectAccessor } from "./ObjectAccessor.js"; import { IfcRootObjectAccessor } from "./IfcRootObjectAccessor.js"; import { isPresent } from "../util/IfcExpressionUtils.js"; export class IfcTypeObjectAccessor extends IfcRootObjectAccessor { getNestedObjectAccessor(name) { let val = this.getIfcPropertyAccessor(name); if (isPresent(val)) { return val; } return this.getIfcPropertySetAccessor(name); } listNestedObjects() { return [...this.listIfcPropertyNames(), ...this.listIfcPropertySetNames()]; } listAttributes() { return [...super.listAttributes()]; } } export function isIfcTypeObjectAccessor(arg) { return (typeof arg.getGuid === "function" && typeof arg.getName === "function" && typeof arg.getDescription === "function" && typeof arg.getIfcClass === "undefined" && typeof arg.getIfcPropertySetAccessor === "function" && typeof arg.getIfcPropertyAccessor === "function" && typeof arg.getIfcTypeObjectAccessor === "undefined" && isObjectAccessor(arg)); } //# sourceMappingURL=IfcTypeObjectAccessor.js.map