ifc-expressions
Version:
Parsing and evaluation of IFC expressions
38 lines (37 loc) • 1.12 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FuncArg = void 0;
const IfcExpressionUtils_js_1 = require("../../util/IfcExpressionUtils.js");
const Types_js_1 = require("../../type/Types.js");
class FuncArg {
constructor(required, name, defaultValue) {
this._required = required;
this._name = name;
this._defaultValue = defaultValue;
}
getType() {
return Types_js_1.Type.ANY;
}
/**
* For the value provided for a specific invocation of the function, return an appropriate result (maybe some kind of type conversion or type check might happen here)
*
* @param invocationValue
*/
transformValue(callingExpr, invocationValue) {
return invocationValue;
}
get required() {
return this._required;
}
get name() {
return this._name;
}
get defaultValue() {
return this._defaultValue;
}
hasDefaultValue() {
return !(0, IfcExpressionUtils_js_1.isNullish)(this._defaultValue);
}
}
exports.FuncArg = FuncArg;
//# sourceMappingURL=FuncArg.js.map