storeObjectRef.ts 504 B

12345678910111213141516171819202122232425262728
  1. import { StoreObject } from './storeObject';
  2. import { StoreValueRef } from './value/store_value_ref';
  3. export class StoreObjectRef extends StoreObject {
  4. private refObj: String;
  5. /**
  6. *
  7. * @param {StoreObject} stoValue
  8. */
  9. constructor (stoValue: StoreValueRef) {
  10. super(stoValue.type, stoValue.getRefAddress(), false);
  11. this.refObj = stoValue.id!;
  12. }
  13. get isRef () {
  14. return true;
  15. }
  16. getRefObj (): String {
  17. return this.refObj;
  18. }
  19. destroy () {
  20. return false;
  21. }
  22. }