UNPKG

ifc-expressions

Version:

Parsing and evaluation of IFC expressions

35 lines (34 loc) 1.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isIfcTypeObjectAccessor = exports.IfcTypeObjectAccessor = void 0; const ObjectAccessor_js_1 = require("./ObjectAccessor.js"); const IfcRootObjectAccessor_js_1 = require("./IfcRootObjectAccessor.js"); const IfcExpressionUtils_js_1 = require("../util/IfcExpressionUtils.js"); class IfcTypeObjectAccessor extends IfcRootObjectAccessor_js_1.IfcRootObjectAccessor { getNestedObjectAccessor(name) { let val = this.getIfcPropertyAccessor(name); if ((0, IfcExpressionUtils_js_1.isPresent)(val)) { return val; } return this.getIfcPropertySetAccessor(name); } listNestedObjects() { return [...this.listIfcPropertyNames(), ...this.listIfcPropertySetNames()]; } listAttributes() { return [...super.listAttributes()]; } } exports.IfcTypeObjectAccessor = IfcTypeObjectAccessor; 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" && (0, ObjectAccessor_js_1.isObjectAccessor)(arg)); } exports.isIfcTypeObjectAccessor = isIfcTypeObjectAccessor; //# sourceMappingURL=IfcTypeObjectAccessor.js.map