UNPKG

@aca-1/a2-composer

Version:
33 lines 1.02 kB
import { Module } from './module.class'; var System = (function () { function System(srv, sys_id) { this.modules = []; this.exists = true; this.service = srv; this.parent = srv; this.id = sys_id; } System.prototype.get = function (mod_id, index) { if (index === void 0) { index = 1; } var module = null; for (var i = 0; i < this.modules.length; i++) { if (this.modules[i].id === mod_id && this.modules[i].index === index) { module = this.modules[i]; } } if (module === null) { module = new Module(this.service, this, mod_id, index); this.modules.push(module); } return module; }; System.prototype.rebind = function () { for (var _i = 0, _a = this.modules; _i < _a.length; _i++) { var mod = _a[_i]; mod.rebind(); } }; return System; }()); export { System }; //# sourceMappingURL=system.class.js.map