storeObjectRef.ts 687 B

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