nglibs-cfd
Version:
NGLibs, The module for CFD field Loading for OpenFOAM.
35 lines (34 loc) • 1.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CFDFieldsHandler = void 0;
class CFDFieldsHandler {
// private static _instance: CFDFieldsHandler;
_CFDField;
// static Instance(): CFDFieldsHandler {
// CFDFieldsHandler._instance = CFDFieldsHandler._instance ?? new CFDFieldsHandler();
// return CFDFieldsHandler._instance;
// }
constructor() {
if (this._instance)
throw `Singleton object exist. Dont new it.`;
}
static Instance() {
this._instance = this._instance || new this();
return this._instance;
}
static get instance() {
return CFDFieldsHandler.Instance();
}
getCFDField() {
let { _CFDField } = this;
if (_CFDField)
return _CFDField;
else
return null;
}
setCFDField(filed) {
this._CFDField = filed;
return this._CFDField;
}
}
exports.CFDFieldsHandler = CFDFieldsHandler;