import { StoreObject } from './storeObject'; import { Location } from '../../memory/location'; export class StoreObjectRef extends StoreObject { private refObj: StoreObject; /** * * @param {StoreObject} stoObj */ constructor (stoObj: StoreObject) { super(stoObj.type, stoObj.locAddress, false); this.refObj = stoObj; } get isRef () { return true; } getRefObj () { return this.refObj; } updateRef (stoObj: StoreObject) { Location.updateAddress(this.locAddress, stoObj.value); } destroy () { return false; } }